Why it's dangerous to fork off a new process in Glasgow Haskell
Wed, 4 Sep 2002 10:53:47 +0200
In local.glasgow-haskell-users, you wrote:
> Sigbjorn Finne wrote:
>> Have a look at GHC.Conc.forkProcess
> Interesting. How exactly does it work, by the way?
Trade secret ;) Simply drop the TSO pointers to all other threads
from the queues so the RTS won't find them again (GC is a
> Posix.runProcess really should use it I think.
No, it's better to be able to choose the way to handle this.
Maybe add a flag to Posix.runProcess. But the whole
GHC.Conc.forkProcess isn't finished, yet, anyway.
> 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.
You still get the child's pid, so feel free to mess with it.
plonk :: m a -> m ()
http://www-i2.informatik.rwth-aachen.de/stolz/ *** PGP *** S/MIME