]> git.tuebingen.mpg.de Git - dss.git/commitdiff
Use only one global variable for snapshot creation pids.
authorAndre Noll <maan@systemlinux.org>
Mon, 16 Mar 2009 15:57:56 +0000 (16:57 +0100)
committerAndre Noll <maan@systemlinux.org>
Mon, 16 Mar 2009 15:57:56 +0000 (16:57 +0100)
There's no need to have pre_create_hook_pid, rsync_pid and
post_create_hook_pid because only one of them can be running at
any point in time. We can always tell which it is by examining the
snapshot_creation_status.

So replace these three variables by the single create_pid variable.

Besides of killing two global variables, this change also fixes a
real bug: If the dss process catches SIGINT or SIGTERM, the old code
would only kill a running rsync process but not the pre-create or
post-create hook. However, the new code kills whatever create process
is currently running, which is the right thing to do.


No differences found