
9 Apr
2007
9 Apr
'07
8:30 a.m.
I wished to get output of unix commands in haskell code. So i wrote: ---------------------------------------------------------------------------------- import System.IO import System.Process eval :: String -> IO String eval s = do (_,hOutput,_,hProcess) <- runInteractiveCommand s sOutput <- hGetContents hOutput waitForProcess hProcess return sOutput ---------------------------------------------------------------------------------- 'eval' works well if output of evaluated command is less than 64Kb. If not - 'eval' never ends. What may cause this problem? Is it possible to use 'runInteractiveCommand' when command's output size is longer than 64Kb? -- Best regards, Sergey Perminov