Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the MCE CPAN distribution.

Report information
The Basics
Id: 94706
Status: resolved
Priority: 0/
Queue: MCE

People
Owner: Nobody in particular
Requestors: paxunix [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.512



Subject: Bug in MCE when cleaning up child processes
Date: Sun, 13 Apr 2014 21:07:29 -0700
To: bug-MCE [...] rt.cpan.org
From: Shawn Halpenny <paxunix [...] gmail.com>
I've been trying to get a tree of processes reliably terminated when one of them receives SIGINT, but it seems MCE isn't quite doing what I expect. I was hoping that use MCE::Signal '-setpgrp' would do what I want, but that only controls whether the group is set, not how anything is killed. In three places in MCE/Signal.pm, it basically does: kill(<signal>, -$$) but that doesn't work since the process group isn't necessarily the same as the PID. kill(<signal>, -getpgrp()) does exactly what I'd expect and kills the entire process group, and reliably cleans up all child processes. -- Shawn Halpenny
Subject: Re: Bug in MCE when cleaning up child processes
Date: Sun, 13 Apr 2014 21:13:14 -0700
To: bug-MCE [...] rt.cpan.org
From: Shawn Halpenny <paxunix [...] gmail.com>
Naturally, as soon as I sent off that email, I noticed I had mistakenly NOT imported MCE::Signal before my other MCE import. Once I did that, all child processes were killed just fine, as expected. On Sun, Apr 13, 2014 at 9:07 PM, Shawn Halpenny <paxunix@gmail.com> wrote: Show quoted text
> I've been trying to get a tree of processes reliably terminated when one > of them receives SIGINT, but it seems MCE isn't quite doing what I expect. > > I was hoping that > use MCE::Signal '-setpgrp' > would do what I want, but that only controls whether the group is set, not > how anything is killed. > > In three places in MCE/Signal.pm, it basically does: > kill(<signal>, -$$) > but that doesn't work since the process group isn't necessarily the same > as the PID. > > kill(<signal>, -getpgrp()) does exactly what I'd expect and kills the > entire process group, and reliably cleans up all child processes. > > -- > Shawn Halpenny > >
MCE 1.512 was released to CPAN to address this bug.