Boost logo

Boost :

From: Gregory Colvin (gregory.colvin_at_[hidden])
Date: 2004-06-22 21:08:58

On Jun 22, 2004, at 3:34 PM, Stefan Seefeld wrote:
> 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...

It's on topic, I think, but perhaps a premature excursion into details
of implementation.

> 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.

Normally you don't want to leak resources, which may or may not involve
zombies. And even if zombies are involved, reclaiming them need not
require a signal handler, which was my original point.

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