Boost logo

Boost :

From: Stefan Seefeld (seefeld_at_[hidden])
Date: 2004-06-22 16:34:57

Gregory Colvin wrote:

>>> But why do you need to reap the zombie? I've implemented
>>> the java process control natives with no need for reaping.
>> I don't know how java deals with this but on posix platforms a
>> sub-process
>> holds some resources that have to be claimed back by the parent process.
> Which you can do by waiting for the child. If you need the exit value
> you might as well wait anyway, if you don't you create a thread to wait.

yes, this was my point. The platform you are on imposes how to clean up
sub-processes, not the language. So you (or the runtime environment) have to
deal with the resource management somehow.
In case you don't need the return status/value (which I would guess is
quite rare) you can do something similar to detaching a thread: you
create a new session for the subprocess (in fact, the subprocess in
question is then the grand-child of the parent process, i.e. the parent's
child process is gone and thus there is nothing to wait for).

Anyways, this is getting offtopic... The point I was trying to make was that
IMO you normally do want to reclaim dead child processes ('zombies'),
so any general solution should provide the means to do that.


Boost list run by bdawes at, gregod at, cpdaniel at, john at