
18 May
2014
18 May
'14
6:25 a.m.
quoth Karsten Gebbert, ...
-- mplayer (hand,o,e,pid) <- runInteractiveProcess "mplayer" ["-fs", "-idle", "-slave"] Nothing Nothing
...
putStrLn "listening for commands" loop sock hand
-- closing everything down sClose sock terminateProcess pid waitForProcess pid return ()
In an idle moment I wrote up a simplified test program, and found something interesting. When compiled with -threaded, the above code garbage-collects and finalizes "o" -- the child process' output. That tends to shorten the process life span. If I build without -threaded, or use "o" during or after the loop, no problem. Or if I build with -threaded but run with the -V0 flag, which I suppose would delay garbage collection. Donn