[libvirt] [PATCH 3/6] virtlockd: treat SIGHUP like SIGUSR1
Michal Privoznik
mprivozn at redhat.com
Tue Dec 10 11:06:41 UTC 2013
On 09.12.2013 07:23, Michael Chapman wrote:
> 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 at very.puzzling.org>
> ---
> src/locking/lock_daemon.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/src/locking/lock_daemon.c b/src/locking/lock_daemon.c
> index 35ccb4e..52d953a 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;
> }
>
>
Mm, okay. But if we go down this path I think we should adjust the
man-page too:
diff --git a/src/locking/virtlockd.pod.in b/src/locking/virtlockd.pod.in
index 99612aa..022d67f 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<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
Squashed in and pushed.
Michal
More information about the libvir-list
mailing list