From: Michael Chapman Date: Mon, 9 Dec 2013 06:23:27 +0000 (+1100) Subject: virtlockd: treat SIGHUP like SIGUSR1 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=8355d42dd3df514c8584e0e5082b945b79671fc5;p=people%2Fdariof%2Flibvirt.git virtlockd: treat SIGHUP like SIGUSR1 SIGHUP is commonly used to instruct a daemon to reload its config. For now we should handle it in virtlockd just like SIGUSR1, rather than having it kill the process. Signed-off-by: Michael Chapman Signed-off-by: Michal Privoznik --- diff --git a/src/locking/lock_daemon.c b/src/locking/lock_daemon.c index 35ccb4e9c..52d953ae3 100644 --- a/src/locking/lock_daemon.c +++ b/src/locking/lock_daemon.c @@ -590,6 +590,8 @@ virLockDaemonSetupSignals(virNetServerPtr srv) return -1; if (virNetServerAddSignalHandler(srv, SIGUSR1, virLockDaemonExecRestartHandler, NULL) < 0) return -1; + if (virNetServerAddSignalHandler(srv, SIGHUP, virLockDaemonExecRestartHandler, NULL) < 0) + return -1; return 0; } diff --git a/src/locking/virtlockd.pod.in b/src/locking/virtlockd.pod.in index 99612aa53..022d67ffa 100644 --- a/src/locking/virtlockd.pod.in +++ b/src/locking/virtlockd.pod.in @@ -54,9 +54,9 @@ Display version information then exit. =head1 SIGNALS -On receipt of B virtlockd will re-exec() its binary, while -maintaining all current locks and clients. This allows for live -upgrades of the virtlockd service. +On receipt of B or B virtlockd will re-exec() its +binary, while maintaining all current locks and clients. This allows +for live upgrades of the virtlockd service. =head1 FILES