15 May 20:42
Re: runInteractiveCommand: program ends before writing or reading all the output
From: Ronald Guida <oddron <at> gmail.com>
Subject: Re: runInteractiveCommand: program ends before writing or reading all the output
Newsgroups: gmane.comp.lang.haskell.cafe
Date: 2008-05-15 18:42:31 GMT
Subject: Re: runInteractiveCommand: program ends before writing or reading all the output
Newsgroups: gmane.comp.lang.haskell.cafe
Date: 2008-05-15 18:42:31 GMT
It looks like a simple race condition to me. You are using "waitForProcess pid" to wait for runInteractiveCommand to finish, but you don't seem to have anything that waits for createDefFile to finish. > main :: IO () > main = do > (file:_) <- getArgs > (_, out, _, pid) <- runInteractiveCommand $ "dumpbin /EXPORTS " ++ file > forkIO (createDefFile file out) > waitForProcess pid > hClose out > hFlush stdout
RSS Feed