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


Groups > comp.lang.python > #16549

Re: Multiprocessing: killing children when parent dies

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <dihedral88888@googlemail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.033
X-Spam-Evidence '*H*': 0.93; '*S*': 0.00; 'subject:when': 0.07; 'python': 0.08; 'reply-to:addr:comp.lang.python': 0.09; 'to:addr:comp.lang.python': 0.09; 'am,': 0.12; '(say': 0.16; 'posix': 0.16; 'cc:addr:python-list': 0.16; 'wrote:': 0.18; 'cc:no real name:2**0': 0.20; 'programming': 0.21; 'dec': 0.22; 'header :In-Reply-To:1': 0.22; 'module,': 0.23; 'cc:2**0': 0.24; 'sat,': 0.25; 'cc:addr:python.org': 0.29; 'oop': 0.30; 'parent': 0.30; 'chris': 0.30; 'does': 0.32; 'header:User-Agent:1': 0.33; 'from:addr:googlemail.com': 0.34; 'languages': 0.35; 'friday,': 0.37; 'thread': 0.37; 'received:google.com': 0.37; 'doing': 0.38; 'signal': 0.38; 'received:209.85': 0.38; 'first.': 0.39; 'talk': 0.39; 'received:209': 0.40; '2011': 0.61; 'header:Reply-To:1': 0.71; 'reply-to:no real name:2**0': 0.72; 'reply- to:addr:googlegroups.com': 0.74; 'initiate': 0.84; 'erlang': 0.91; 'killing': 0.91
Newsgroups comp.lang.python
Date Fri, 2 Dec 2011 07:57:56 -0800 (PST)
In-Reply-To <mailman.3224.1322838818.27778.python-list@python.org>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=1.168.133.35; posting-account=5JdMBQoAAABHnS4mjpqEzxnmWtgiiVNw
References <CAGGWHE7b-4UvtinLW2U4jWv_uD7_nLMCQBxLjZ2rFEjsTxkZAQ@mail.gmail.com> <mailman.3224.1322838818.27778.python-list@python.org>
User-Agent G2/1.0
X-Google-Web-Client true
MIME-Version 1.0
Subject Re: Multiprocessing: killing children when parent dies
From 88888 Dihedral <dihedral88888@googlemail.com>
To comp.lang.python@googlegroups.com
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
Reply-To comp.lang.python@googlegroups.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>
Message-ID <mailman.3227.1322841479.27778.python-list@python.org> (permalink)
Lines 17
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1322841479 news.xs4all.nl 6985 [2001:888:2000:d::a6]:54579
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:16549

Show key headers only | View raw


On Friday, December 2, 2011 11:13:34 PM UTC+8, Chris Angelico wrote:
> On Sat, Dec 3, 2011 at 2:05 AM, Mihai Badoiu <mba...@gmail.com> wrote:
> > In the multiprocessing module, on a Process p, by just doing p.daemon=1
> > before p.start(), we can make the child die when the parent exits.  However,
> > the child does not die if the parent gets killed.
> > How can I make sure the child die when the parent gets killed?
> 
> Are you in control of the killing of the parent? One easy way would be
> to catch the signal (say SIGINT) and initiate an orderly shutdown,
> signalling the children first.
> 
> ChrisA

Multiple thread supporting programming languages  in true OOP as Erlang and Python do not talk about POSIX signals.

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


Thread

Re: Multiprocessing: killing children when parent dies Chris Angelico <rosuav@gmail.com> - 2011-12-03 02:13 +1100
  Re: Multiprocessing: killing children when parent dies 88888 Dihedral <dihedral88888@googlemail.com> - 2011-12-02 07:57 -0800
  Re: Multiprocessing: killing children when parent dies 88888 Dihedral <dihedral88888@googlemail.com> - 2011-12-02 07:57 -0800
    Re: Multiprocessing: killing children when parent dies Chris Angelico <rosuav@gmail.com> - 2011-12-03 03:14 +1100
      Re: Multiprocessing: killing children when parent dies 88888 Dihedral <dihedral88888@googlemail.com> - 2011-12-02 08:27 -0800
      Re: Multiprocessing: killing children when parent dies 88888 Dihedral <dihedral88888@googlemail.com> - 2011-12-02 08:27 -0800
        Re: Multiprocessing: killing children when parent dies Dan Stromberg <drsalists@gmail.com> - 2011-12-07 11:50 -0800

csiph-web