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


Groups > comp.lang.python > #16550

Re: Multiprocessing: killing children when parent dies

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!nx02.iad01.newshosting.com!newshosting.com!69.16.185.21.MISMATCH!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
From 88888 Dihedral <dihedral88888@googlemail.com>
Newsgroups comp.lang.python
Subject Re: Multiprocessing: killing children when parent dies
Date Fri, 2 Dec 2011 07:57:56 -0800 (PST)
Organization http://groups.google.com
Lines 17
Message-ID <31747430.412.1322841476524.JavaMail.geo-discussion-forums@prfx15> (permalink)
References <CAGGWHE7b-4UvtinLW2U4jWv_uD7_nLMCQBxLjZ2rFEjsTxkZAQ@mail.gmail.com> <mailman.3224.1322838818.27778.python-list@python.org>
Reply-To comp.lang.python@googlegroups.com
NNTP-Posting-Host 1.168.133.35
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
X-Trace posting.google.com 1322841864 23915 127.0.0.1 (2 Dec 2011 16:04:24 GMT)
X-Complaints-To groups-abuse@google.com
NNTP-Posting-Date Fri, 2 Dec 2011 16:04:24 +0000 (UTC)
Cc python-list@python.org
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
User-Agent G2/1.0
X-Google-Web-Client true
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:16550

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