]> git.tuebingen.mpg.de Git - dss.git/commitdiff
Kill children on fatal errors.
authorAndre Noll <maan@systemlinux.org>
Wed, 16 Oct 2013 12:17:46 +0000 (14:17 +0200)
committerAndre Noll <maan@systemlinux.org>
Wed, 16 Oct 2013 12:28:33 +0000 (14:28 +0200)
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.


No differences found