Fork/exec in Haskell

Here’s some simple code I put together. I’m mostly posting it so I won’t have any problems finding it in the future. module Main where   import Control.Monad import System.Exit import System.Posix.IO import System.Posix.Process   executeChild = do mapM_ closeFd [stdInput, stdOutput, stdError] devnull <- openFd "/dev/null" ReadWrite Nothing defaultFileFlags dup devnull; dup devnull executeFile …

Continue reading ‘Fork/exec in Haskell’ »