[Haskell-cafe] Re: Bug in runInteractiveProcess?

Donn Cave donn at drizzle.com
Wed Oct 17 11:46:41 EDT 2007


On Wed, 17 Oct 2007, Simon Marlow wrote:
...
> Note that forkProcess doesn't currently work with +RTS -N2 (or any value 
> larger than 1), and it isn't likely to in the future.  I suspect 
> forkProcess should be deprecated.
> 
> The POSIX spec is pretty strict about what system calls you can make in the 
> child process of a fork in a multithreaded program, and those same 
> restrictions apply in Haskell, and they apply not only to the Haskell code 
> but also to the runtime (e.g. what if the child process needs more memory 
> and the runtime calls mmap(), that's not allowed).  We get away with it 
> most of the time because the OSs we run on are less strict than POSIX. 
> However, in general I think forking should be restricted to C code that you 
> invoke via the FFI.

Just to be precise about it, though, there's nothing about Haskell per se
that causes trouble with fork, right?   This is a GHC implementation issue.

	Donn Cave, donn at drizzle.com



More information about the Haskell-Cafe mailing list