Subject: | Feature Request: Allow option for "stop" to kill process group, not just process. |
Date: | Wed, 13 Feb 2013 12:01:25 +1100 |
To: | bug-Daemon-Generic [...] rt.cpan.org |
From: | Clinton Mead <clintonmead [...] gmail.com> |
In the case where "run" spawns a child process, that process will hang
around when the child is killed. One could get signal handlers to catch
this and kill the children, but if for whatever reason these signal
handlers do not activate in time, Daemon::Generic will send the 'KILL'
signal, which can't be caught. This will leave the children behind.
This could be implemented by a function, say "sub gd_kill_group { return 0;
}" which can be overridden to return true, and in that case "gd_kill"
actually kills -$pid, not $pid.