Notifications when process is killed
Andrea Di Mario
anddimario at gmail.com
Tue Aug 2 06:36:44 EDT 2011
> You won't be able to catch SIGTERM, as Thomas said, but if you need to
> know what caused a process to end, the best way is to have code in the
> parent process to catch SIGCHLD. When the child ends, for any reason,
> its parent is sent SIGCHLD with some parameters, including the signal
> number that caused the termination; you can then log anything you
> want.
Hi, i understand, i've read that SIGKILL can't catch, but nothing
about SIGTERM.
If i use SIGCHLD, i will have difficult when parent receive a SIGTERM, or not?
Thanks, regards.
--
Andrea Di Mario
More information about the Python-list
mailing list