[lxc-devel] [lxd/master] lxd/daemon: Ignore SIGHUP

stgraber on Github lxc-bot at linuxcontainers.org
Wed Jan 22 13:16:27 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 384 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200122/d7bd2275/attachment.bin>
-------------- next part --------------
From 5f34765f9118f5e36689267b6d66d82195e178b5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Wed, 22 Jan 2020 15:15:24 +0200
Subject: [PATCH] lxd/daemon: Ignore SIGHUP
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Closes #6748
Closes #6743

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 lxd/main_daemon.go | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lxd/main_daemon.go b/lxd/main_daemon.go
index 64876128a9..69fddf8cd5 100644
--- a/lxd/main_daemon.go
+++ b/lxd/main_daemon.go
@@ -73,6 +73,9 @@ func (c *cmdDaemon) Run(cmd *cobra.Command, args []string) error {
 	signal.Notify(ch, unix.SIGQUIT)
 	signal.Notify(ch, unix.SIGTERM)
 
+	chIgnore := make(chan os.Signal)
+	signal.Notify(chIgnore, unix.SIGHUP)
+
 	s := d.State()
 	select {
 	case sig := <-ch:


More information about the lxc-devel mailing list