I used os.waitpid,but I still can't Zombie process?

Donn Cave donn at drizzle.com
Thu Dec 20 06:12:15 CET 2001


Quoth "lokie.spods" <lokie.spods at ntlworld.com>:
...
| However you can save a lot of overhead from the loop, by creating a handler
| for SIGCHLD and calling waitpid(-1, os.WNOHANG) from within the handler. See
| Pythons signal module for more details of that option.

Hm, I think we're going in circles here - if I remember right, he was
having problems with EINTR because of SIGCHLDs.  Between that and the
extra problems Python has with signal handling, I personally think SIGCHLD
is a total loser for Python programs.

Once when we were wrestling with this one someone, maybe me, suggested
a pipe as a signalling device, just leave one end in the child process
and it will become readable on exit because of the end of file.  Could
be tricky to get it to work reliably, and of course not great for massive
numbers of processes, but I don't know if anyone has really checked it out.

	Donn Cave, donn at drizzle.com



More information about the Python-list mailing list