Multiprocessing: killing children when parent dies
88888 Dihedral
dihedral88888 at googlemail.com
Fri Dec 2 10:57:56 EST 2011
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... at 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.
More information about the Python-list
mailing list