Open rahulmutt opened 6 years ago
From: https://lotz84.github.io/haskellbyexample/ex/spawning-processes
import System.Process import System.IO main :: IO () main = do (Just hin, Just hout, _, _) <- createProcess (proc "grep" ["hello"]){ std_in = CreatePipe, std_out = CreatePipe } hPutStr hin "hello grep\ngoodbye grep" grepBytes <- hGetContents hout putStrLn "> grep hello" putStrLn grepBytes
should give
> grep hello hello grep
but gives
> grep hello [hangs]
From: https://lotz84.github.io/haskellbyexample/ex/spawning-processes
should give
but gives