normal exit TERM is not working every time
Bug #924301 reported by
Removed by request
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
upstart (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
I'm using Ubuntu 12.04 dev with upstart 1.4-0ubuntu4. I have written a script which uses the respawn stanza and TERM as a normal exit. But on some commands the process will respawn and on other commands not (like expected) if I use a SIGTERM on the process. Here are 2 examples:
normal exit 0 KILL TERM
respawn
respawn limit 2 60
exec sleep 60
A SIGTERM on the "sleep 60" process will not cause it to respawn.
normal exit 0 KILL TERM
respawn
respawn limit 2 60
exec java -jar /usr/local/
A SIGTERM on the java process will cause it to respawn. I don't know why it is respawning. It is the only process that is created and a SIGTERM shouldn't cause it to respawn.
To post a comment you must log in.
If a job marked 'normal TERM' is respawning when you send it kill -TERM, then the process is probably *not* dying as a result of the signal - it probably instead has a signal handler and is exiting with some different exit status.
There's no other reason why upstart would treat TERM differently for some jobs than others.
Try running the command from the command line, killing it with SIGTERM, and checking what you actually get as an exit status.