From: Andre Noll Date: Wed, 16 Oct 2013 12:17:46 +0000 (+0200) Subject: Kill children on fatal errors. X-Git-Tag: v0.1.5~1^2 X-Git-Url: http://git.tuebingen.mpg.de/?a=commitdiff_plain;h=19982b7b17a603bd4a0b47c724b4e830daaf88d9;hp=19982b7b17a603bd4a0b47c724b4e830daaf88d9;p=dss.git Kill children on fatal errors. If dss is about to die because it received SIGINT or SIGTERM, we first restart the rsync process by sending SIGCONT, then send SIGTERM to both the rsync and the rm process to get rid of any child processes. This works fine, but there are other fatal errors for which we miss to clean up as thoroughly, most importantly if there is not enough free disk space for a single snapshot. This patch moves the signal-related cleanup part to the new function kill_children(), and changes handle_signal() and com_run() to call this function right before the exit hook is invoked. ---