
1 Aug
2008
1 Aug
'08
10:13 a.m.
Hi all, I'm running ghc 6.8.2 in OSX and Linux. The following program behaves as expected when run on a terminal. == module Main where import System.Process main = sequence $ replicate 3 command where command = do putStrLn "foo" waitForProcess =<< runCommand "echo echo" putStrLn "bar" == $ ghc --make Main.hs -o main $./main foo echo bar foo echo bar foo echo bar However, when stdout is redirected to a file, the order is no longer respected: $ ./main > output $ cat output echo echo echo foo bar foo bar foo bar Am I missing something or should I file a bug report? Thanks in advance, Fons