jobd.pl: kill jobs gently
commita69042196777e6982a103d4bbdff15957c63b7d0
authorKyle J. McKay <mackyle@gmail.com>
Mon, 26 Jan 2015 21:56:20 +0000 (26 13:56 -0800)
committerKyle J. McKay <mackyle@gmail.com>
Mon, 26 Jan 2015 21:56:20 +0000 (26 13:56 -0800)
tree7166d62bcedbf5bdf158d6c1fcde781c56ed67b5
parentf04fba20485500b35ba81bea45d810a78ed90634
jobd.pl: kill jobs gently

Instead of always sending a SIGKILL right away to kill jobs because
either they timed out or we are exiting, first send a SIGTERM and then
if the job does not cooperate and exit within 15 seconds send a SIGKILL.

This allows jobs to clean up after themselves and also allows timing
out jobs to send a failure message rather than silently being killed.
jobd/jobd.pl