]> xenbits.xensource.com Git - people/dariof/libvirt.git/commitdiff
virtlockd: treat SIGHUP like SIGUSR1
authorMichael Chapman <mike@very.puzzling.org>
Mon, 9 Dec 2013 06:23:27 +0000 (17:23 +1100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 10 Dec 2013 11:02:37 +0000 (12:02 +0100)
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 <mike@very.puzzling.org>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/locking/lock_daemon.c
src/locking/virtlockd.pod.in

index 35ccb4e9cb57bbf64d4b33b8960aa7e5f0c42fe6..52d953ae3f2293ec34db5c34a77e14e2f8d0f7b0 100644 (file)
@@ -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;
 }
 
index 99612aa537b0380be168f85e19fa353aa7601306..022d67ffac7794e328ae854297ab10aef067f923 100644 (file)
@@ -54,9 +54,9 @@ Display version information then exit.
 
 =head1 SIGNALS
 
-On receipt of B<SIGUSR1> 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<SIGUSR1> or B<SIGHUP> virtlockd will re-exec() its
+binary, while maintaining all current locks and clients. This allows
+for live upgrades of the virtlockd service.
 
 =head1 FILES