[RFC] stopsignal stanza

Clint Byrum clint at ubuntu.com
Wed May 4 16:29:22 UTC 2011


Excerpts from Marc - A. Dahlhaus's message of Wed May 04 03:52:35 -0700 2011:
> Am Montag, den 02.05.2011, 16:28 -0700 schrieb Scott James Remnant:
> > Looks to me like you're on exactly the right track here.
> > 
> > 
> > Just needs some more test coverage. I have no further comments ;-)
> > 
> 
> Version with tests attached...
> 
> IMO the naming of the kill stanza is now slightly inappropriate:
> 
> kill timeout VAL:
> Was clear for defining the timeout before we send a SIGKILL after
> stopping a job.
> 
> kill signal SIG:
> We are not changing the SIGKILL signal here but the SIGNAL we send to a
> Job that should be stopped before we send a kill signal if the job
> doesn't stop before it stops longer as the defined timeout allows it to
> do.
> 
> I suggest changing the name of the stanza from kill to stopping and add
> an alias kill for backward compatibility and document it as such. It
> would be a better and not misleading name as we send "stopping signal"
> when we stop the job and we would send SIGKILL to it after the "stopping
> timeout" is reached.
> 
> What do you think?

IMO, kill timeout X should remain, it is very clear what it does

Since upstart stanzas have leaned toward readability, I think this works
quite nicely:

kill signal SIGINT
reload signal SIGUSR1
kill exec postfix stop
reload exec apachectl graceful

SIGKILL is special, and must never be overridden, so it should not even
be considered. The 'kill timeout' is the timeout waiting for the kill
action before SIGKILL is sent. Its always going to be confusing, because
of the symbolic name of SIGKILL. No matter what the special action is,
we're always going to send SIGKILL to the pid after kill timeout.



More information about the upstart-devel mailing list