Comment 2 for bug 924301

Revision history for this message
Removed by request (removed3425744) wrote :

>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.

Shouldn't upstart ignore such a behaviour of a signal handler? The application got still a SIGTERM independent of what it returns.

>Try running the command from the command line, killing it with SIGTERM, and checking what you actually get as an exit status.

"sleep 60" and "java -jar /usr/local/bin/minecraft_server.jar nogui" are returning 143 if they close because of a SIGTERM. I have tried this with test.conf:

normal exit 143
respawn
respawn limit 2 60
exec sleep 60

After a SIGTERM sleep 60 is curiously respawning.

normal exit 143
respawn
respawn limit 2 60
exec java -jar /usr/local/bin/minecraft_server.jar nogui

But the java application doesn't respawn anymore as expected if closed with a SIGTERM.