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