How to tell if a forked process is done?

Donn Cave donn at u.washington.edu
Wed Sep 24 17:43:41 EDT 2003


In article <bksu23$rp0$1 at news.island.liu.se>,
 Thomas Bellman <bellman at lysator.liu.se> wrote:

...
> There it least one Unix that reuse process ids immediately when
> they are free.  A vague memory says that it is AIX that does
> this, but I'm not sure; it could be some of the BSD dialects too.

Not AIX 4 or 5, and no BSD I've seen- cursory inspection suggests
it is not the case with FreeBSD 5.1 nor MacOS X 10.2.6.

> However, in this very case, *that* isn't a problem.  The process
> id won't be free to reuse until the parent has called wait(2) to
> reap its child.  On the other hand, that means that kill(pid, 0)
> won't signal an error even after the child has died; the zombie
> is still there...

Good points.

   Donn Cave, donn at u.washington.edu




More information about the Python-list mailing list