]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc.init: ignore SIGHUP
authorTycho Andersen <tycho@tycho.ws>
Mon, 5 Feb 2018 14:19:25 +0000 (14:19 +0000)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 6 Feb 2018 12:36:54 +0000 (13:36 +0100)
see comment for details.

Signed-off-by: Tycho Andersen <tycho@tycho.ws>
src/lxc/lxc_init.c

index c20dfbb3fe6d4decfc87c974936bce8a2b98c35b..7cd990bdd2390b430108a976c745423dbb506bb5 100644 (file)
@@ -379,6 +379,17 @@ int main(int argc, char *argv[])
 
                switch (was_interrupted) {
                case 0:
+               /* Some applications send SIGHUP in order to get init to reload
+                * its configuration. We don't want to forward this onto the
+                * application itself, because it probably isn't expecting this
+                * signal since it was expecting init to do something with it.
+                *
+                * Instead, let's explicitly ignore it here. The actual
+                * terminal case is handled in the monitor's handler, which
+                * sends this task a SIGTERM in the case of a SIGHUP, which is
+                * what we want.
+                */
+               case SIGHUP:
                        break;
                case SIGPWR:
                case SIGTERM: