Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #10713 > unrolled thread
| Started by | Andrea Di Mario <anddimario@gmail.com> |
|---|---|
| First post | 2011-08-02 12:36 +0200 |
| Last post | 2011-08-02 12:36 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
Notifications when process is killed Andrea Di Mario <anddimario@gmail.com> - 2011-08-02 12:36 +0200
| From | Andrea Di Mario <anddimario@gmail.com> |
|---|---|
| Date | 2011-08-02 12:36 +0200 |
| Subject | Notifications 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
Back to top | Article view | comp.lang.python
csiph-web