how to catch signals
quinn at mono.ugcs.caltech.edu
Mon Mar 6 02:36:18 CET 2000
Hello! I have a process that starts children, and perhaps kills them at some
time. The children need to be unregistered when they die, so I set up a
SIGCHLD handler that does so. Unfortunately, the handler doesn't always get
called, and I want to know what the safest way to catch a SIGCHLD
'synchronously' after I kill (I can't just wait() afterwards, because it's
possible someone else killed it).
I changed things to:
except: pass # IOError, interrupted system call
Is this recommended? Any other approaches? I haven't been able to figure out
why the handler wasn't being called before...
More information about the Python-list