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


Groups > comp.lang.python > #10714

Re: Notifications when process is killed

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.071
X-Spam-Evidence '*H*': 0.87; '*S*': 0.01; 'subject:process': 0.07; 'subject:when': 0.07; 'not?': 0.09; 'am,': 0.13; 'wrote:': 0.15; '11:36': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'aug': 0.19; 'received:209.85.210.174': 0.19; 'received:mail-iy0-f174.google.com': 0.19; 'header:In-Reply-To:1': 0.22; 'tue,': 0.23; 'receives': 0.25; 'work.': 0.28; 'message- id:@mail.gmail.com': 0.28; 'parent': 0.30; 'to:addr:python-list': 0.34; 'received:google.com': 0.38; 'received:209.85': 0.38; 'subject:: ': 0.38; 'signal': 0.38; 'two': 0.38; 'difficult': 0.39; 'to:addr:python.org': 0.39; 'received:209': 0.40; 'your': 0.60; 'watch': 0.63; 'receive': 0.68; 'cause': 0.69; 'death': 0.82; 'andrea': 0.84; 'child,': 0.84; "child's": 0.91; 'subject:skip:N 10': 0.93
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=bSyx4/kPIKdUV07aGtww4h28OzFRxhowcls2RAKbqnI=; b=kUMveiurTpUcMEeW2TDS4i3Z1FWlZhfA7E4eImddZgl5jmLN3AaYGTHsSMJgNE4+ak /Onf8Rc5TpQayKd85GCne+vwfy1uVsX4P8WFoAaI0L7r/ckWaKQ+N3JJURTEQnTXfCrw kjQXXc7BJ6Fwvf3RxEIcsOzaQV+b+d2lJ+mK0=
MIME-Version 1.0
In-Reply-To <CAKBHSgykQS0xC-2h_Z59wFHwzqh37+CasUnbGtzk5MZs_9KtqA@mail.gmail.com>
References <CAKBHSgykQS0xC-2h_Z59wFHwzqh37+CasUnbGtzk5MZs_9KtqA@mail.gmail.com>
Date Tue, 2 Aug 2011 11:44:01 +0100
Subject Re: Notifications when process is killed
From Chris Angelico <rosuav@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
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.1760.1312281844.1164.python-list@python.org> (permalink)
Lines 9
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1312281844 news.xs4all.nl 23980 [2001:888:2000:d::a6]:46082
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:10714

Show key headers only | View raw


On Tue, Aug 2, 2011 at 11:36 AM, Andrea Di Mario <anddimario@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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Notifications when process is killed Chris Angelico <rosuav@gmail.com> - 2011-08-02 11:44 +0100

csiph-web