On Wed, 13 Sep 2006, Tim Newsham wrote:
> I'm having a problem with program execution in win32 which seems > to be tied to laziness. The function I'm using is: > > runCmd cmd outdir dir base ext = do > let argv = words cmd > (i,o,e,p) <- runInteractiveProcess (head argv) (drop 1 argv) Nothing > Nothing > hClose i > out <- hGetContents o > -- print out > x <- waitForProcess p > hClose o > hClose e > case x of > ExitSuccess -> return 0 > (ExitFailure n) -> return n Btw. you may want to enclose starting the process and closing the file handles in a 'bracket'. _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
