From: Tycho Andersen Date: Mon, 5 Feb 2018 14:19:25 +0000 (+0000) Subject: lxc.init: ignore SIGHUP X-Git-Tag: lxc-2.0.10~361 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=372ecb703f7351c8d9e7a9c41e62fb5915d0ca2c;p=thirdparty%2Flxc.git lxc.init: ignore SIGHUP see comment for details. Signed-off-by: Tycho Andersen --- diff --git a/src/lxc/lxc_init.c b/src/lxc/lxc_init.c index c20dfbb3f..7cd990bdd 100644 --- a/src/lxc/lxc_init.c +++ b/src/lxc/lxc_init.c @@ -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: