Notifications when process is killed

Hansmeet Singh hansmeetschool at gmail.com
Tue Aug 2 11:30:04 EDT 2011


you shouldn't have anything to worry about SIGTERM if you send out a SIGCHLD

On Tue, Aug 2, 2011 at 3:44 AM, Chris Angelico <rosuav at gmail.com> wrote:

> On Tue, Aug 2, 2011 at 11:36 AM, Andrea Di Mario <anddimario at gmail.com>
> wrote:
> > If i use SIGCHLD, i will have difficult when parent receive a SIGTERM, or
> not?
>
> What you would do is create two processes. Set up your signal
> handlers, then fork; in the parent, just watch for the child's death -
> in the child, do all your work. When the parent receives SIGCHLD, it
> can ascertain the cause of death.
>
> ChrisA
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110802/457c18fb/attachment-0001.html>


More information about the Python-list mailing list