Why it's dangerous to fork off a new process in Glasgow Haskell

George Russell ger@tzi.de
Wed, 04 Sep 2002 09:37:45 +0200


Sigbjorn Finne wrote:
> 
> Have a look at GHC.Conc.forkProcess, which Volker Stolz
> contributed a while ago. Does what you want, but I think you're
> actually doing the Right Thing by implementing the fork() & exec()
> outside of Haskell.
[snip]
Interesting.  How exactly does it work, by the way?  Posix.runProcess really should
use it I think.

I wish Posix.runProcess was available and worked on both Windows and Unix.  I am now
in the unhappy position of having had to code equivalent functions in C on both.

The signature of Posix.runProcess is not quite adequate though; one wants some control
over the child thread.  At a minimum, it would be nice to be able to kill it.