We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
There is a several second delay before results appear when running runInteractiveCommand or similar with stdin. How do I eliminate this delay?
runInteractiveCommand
This can occur due to not terminating a process handle, or not closing a stdin handle after a call to a method such as runInteractiveCommand.
Consider:
(proc_in, proc_out, _, _) <- runInteractiveCommand "xargs ls -l" hPutStr proc_in "/usr/local" putStrLn =<< hGetContents proc_out
In this case, the solution is:
(proc_in, proc_out, _, h) <- runInteractiveCommand "xargs ls -l" hPutStr proc_in "/usr/local" hFlush proc_in hClose proc_in output <- hGetContents proc_out waitForProcess h putStrLn output