
15 May
2008
15 May
'08
6:42 p.m.
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