
3 Nov
2008
3 Nov
'08
7:52 a.m.
David Roundy wrote:
On Sun, Nov 02, 2008 at 09:15:25PM +0100, Marc Weber wrote:
On Mon, Nov 03, 2008 at 01:02:12AM +1100, Rafal Kolanski wrote:
Rafal Kolanski. [...] Why do you use forkIO here? It's not necessary. The process will run in background on its own. ?
It looks to me like this code requires a forkIO, not in the writing to inp, but rather in the reading of out and err. Otherwise, those buffers may fill up and your process will hang...
It seems to be as you say. Trying for a single-threaded solution to this problem always locked up the program, until I found someone's code snippet online using forkIO and extrapolated from that. Sincerely, Rafal Kolanski.