Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #10713 > unrolled thread

Notifications when process is killed

Started byAndrea Di Mario <anddimario@gmail.com>
First post2011-08-02 12:36 +0200
Last post2011-08-02 12:36 +0200
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  Notifications when process is killed Andrea Di Mario <anddimario@gmail.com> - 2011-08-02 12:36 +0200

#10713 — Notifications when process is killed

FromAndrea Di Mario <anddimario@gmail.com>
Date2011-08-02 12:36 +0200
SubjectNotifications when process is killed
Message-ID<mailman.1759.1312281407.1164.python-list@python.org>
> 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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web