Hi,
  I have code like this and it leaves lots of zombies of flow-export.
Then I add waitForProcess.... Well I do not know where to put it.
Before or after 'hGetContents' both make the program hung.

exportCSV :: FilePath -> IO [String]
exportCSV file = do
  csv_ <- withBinaryFile file ReadMode $ \i -> do
    (_, Just o, _, h) <- createProcess $ CreateProcess (RawCommand
"/usr/bin/flow-export" ["-f2"]) Nothing Nothing (UseHandle i)
CreatePipe Inherit True False
    hGetContents o
  return $ tail $ lines csv_

-- 
竹密岂妨流水过
山高哪阻野云飞

And for G+, please use magiclouds#gmail.com.

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to