I'd like to get forkProcess# fixed in 6.2, even if that means changing
the interface.

First, could you explain exactly the problems with implementing the
current version of forkProcess?  Do we only run into problems when we
try to implement forkProcess in the threaded RTS?

We run into quite different problems whether we use the threaded RTS or not.
With the non-threaded RTS, the current situation is that we keep not only the
current thread, but also all other main threads.
I think that we cannnot do better than that. Every main thread is due to a call-in into Haskell; all except the intial one are therefore indirectly caused by a safe foreign call out of Haskell.
So we have the stack frames for each of these call-outs on the (only) OS thread's stack. As we can't remove a stack frame from the middle of the C stack, we cannot delete main threads. Period.
Most of the time, that's OK, but that means that we sometimes have to copy more than one (Haskell) thread into the new process. That's not good, it has already bitten people...


I'll answer the threaded RTS case in my next e-mail (coming up soon in a mailbox near you).

Cheers,

Wolfgang

_______________________________________________
Cvs-ghc mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to