]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
console: set SFD_CLOEXEC on signal fd
authorChristian Brauner <christian.brauner@ubuntu.com>
Sun, 31 Dec 2017 00:58:16 +0000 (01:58 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Fri, 19 Jan 2018 14:07:30 +0000 (15:07 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/console.c

index 9f9a82ad2a30c12d764116893ba528fa71b36cb8..40cc1fae53fc902c5be9904e02a780e83c841c8f 100644 (file)
@@ -166,7 +166,7 @@ struct lxc_tty_state *lxc_console_signal_init(int srcfd, int dstfd)
                goto on_error;
        }
 
-       ts->sigfd = signalfd(-1, &mask, 0);
+       ts->sigfd = signalfd(-1, &mask, SFD_CLOEXEC);
        if (ts->sigfd < 0) {
                WARN("Failed to create signal fd");
                sigprocmask(SIG_SETMASK, &ts->oldmask, NULL);