[Mono-dev] System.Unix.Native.Syscall.fork is commented out
Robert Jordan
robertj at gmx.net
Wed Sep 3 04:33:57 EDT 2008
Avery Pennarun wrote:
> However, I don't understand the rationale here. It seems to me that
> fork() has nothing to do with shutdown, and thus cannot possibly
> bypass "essential shutdown code." On the other hand, Syscall.execve
> is *not* obsolete and *does* bypass shutdown code. Furthermore, the
> recommended System.Diagnostics.Process class provides no equivalent to
> fork(), so I'm not sure why it's being recommended.
>
> What's the rationale here?
If a child is calling exit() upon termination, parent's handles will
be closed as well. This will most likely break parts of the runtime
(io-layer, etc.).
execve is different because it simply replace the process, thus it
can `only' break code that depends upon a clean shutdown.
Robert
More information about the Mono-devel-list
mailing list