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


Groups > comp.lang.python > #10713

Notifications when process is killed

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <anddimario@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.070
X-Spam-Evidence '*H*': 0.86; '*S*': 0.00; 'subject:process': 0.07; 'subject:when': 0.07; 'not?': 0.09; 'ends,': 0.16; 'parameters,': 0.16; 'thanks,': 0.17; 'received:209.85.210.174': 0.19; 'received :mail-iy0-f174.google.com': 0.19; 'end,': 0.23; 'reason,': 0.23; 'code': 0.24; 'message-id:@mail.gmail.com': 0.28; 'parent': 0.30; 'hi,': 0.31; "won't": 0.32; "i've": 0.33; 'to:addr:python-list': 0.34; "can't": 0.34; 'anything': 0.37; 'some': 0.37; 'but': 0.37; 'received:google.com': 0.38; 'received:209.85': 0.38; 'signal': 0.38; 'difficult': 0.39; 'to:addr:python.org': 0.39; 'received:209': 0.40; 'receive': 0.68; 'header:Reply-To:1': 0.71; 'reply-to:no real name:2**0': 0.72; 'regards.': 0.76; 'andrea': 0.84; 'subject:skip:N 10': 0.93
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:reply-to:date:message-id:subject:from:to:content-type; bh=bGLCI4UwKL+EPY350kLUwOkBD5bX4qp4jyuD0a0vvSw=; b=Mp5+AthNzx+fSNmZP1IoB+jijdEH4GUrCrnKdUzg0YEpKNSFxe8PdjCnsbAfRJYDPv q6X1Qldhp26BXg5DhnPiTu6MmRhhl/iqA2TwBiX42LdTAe1O3ebMyiRT3C+EmJtIGuuJ mQ2Sxzfxpns/BtaggyYhGB13EmqqziceCquWE=
MIME-Version 1.0
Date Tue, 2 Aug 2011 12:36:44 +0200
Subject Notifications when process is killed
From Andrea Di Mario <anddimario@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
Reply-To andrea.dimario@speakage.com
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1759.1312281407.1164.python-list@python.org> (permalink)
Lines 15
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1312281407 news.xs4all.nl 23851 [2001:888:2000:d::a6]:46702
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:10713

Show key headers only | View raw


> 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 comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

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

csiph-web