Ah, got your point. You could always set stopsignal to SIGKILL, if you don't mind that the whole process group get's killed without prior sigterm. (Hackish..)
Would stopasgroup imply killasgroup? Or what would happen when stopasgroup=True and killasgroup=False? Would that kill SIGTERM to the whole group, but then killing just the parent? This may be a nice time to talk about the signal handling as a whole. My idea was that we could have: 1] Exposing "signal" command, that would send arbitrary signal to the process and "signalgroup" that would send it to the whole process group. (for example: "signal SIGHUP myprocess" and "signalgroup SIGTERM myprocess") 2] Option for signal "chains", so for example sending SIGTERM could imply sending SIGKILL after stopwaitsecs 3] "stop myprocess" would be then just and alias for "signal SIGTERM myprocess" with chain TERM-KILL enabled. 4] Defaults would be of course backwards compatible. It may sound complicated, but process.kill() method is already implementing the "signal" command. So the change wouldn't be so dramatic. But anyway, if there's not a bit agreement on refactoring and making bigger changes, I vote for "stopasgroup" for now... Ales ------------------------------------------------------ Ales Zoulek +420 604 332 515 Jabber: [email protected] ------------------------------------------------------ On Sat, Mar 31, 2012 at 12:16 AM, Roger Hoover <[email protected]>wrote: > This is in addition to killasgroup. Killasgroup doesn't work for this > situation b/c the parent process exits after receiving SIGTERM. Supervisor > never sends SIGKILL b/c the parent is dead. This leaves the child orphaned. > > > On Fri, Mar 30, 2012 at 2:59 PM, Ales Zoulek <[email protected]>wrote: > >> Hey, >> >> we already have that [1] and it's called killasgroup :) >> >> 1] >> https://github.com/Supervisor/supervisor/blob/master/supervisor/process.py#L354 >> >> >> Cheers, Ales >> >> ------------------------------------------------------ >> Ales Zoulek >> +420 604 332 515 >> Jabber: [email protected] >> ------------------------------------------------------ >> >> >> On Fri, Mar 30, 2012 at 8:40 PM, Roger Hoover <[email protected]>wrote: >> >>> Hi, >>> >>> Any objections to a "stopasgroup" option? >>> >>> I've run into a case where I want to run Flask in debug mode under >>> supervisord in development and the parent Flask process doesn't propagate >>> the SIGTERM or SIGINT signals to it's child, >>> leaving it orphaned. This doesn't happen on the command line b/c the >>> shell sends SIGINT to the entire foreground process group. >>> >>> For cases like this, it would be useful to be able to set an option, >>> called stopasgroup, that sends the stop signal to the whole process group. >>> >>> Cheers, >>> >>> Roger >>> >>> >>> _______________________________________________ >>> Supervisor-users mailing list >>> [email protected] >>> http://lists.supervisord.org/mailman/listinfo/supervisor-users >>> >>> >> >
_______________________________________________ Supervisor-users mailing list [email protected] http://lists.supervisord.org/mailman/listinfo/supervisor-users
