]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
attach: use STDIN_FILENO instead of hard-coding 0
authorChristian Brauner <christian.brauner@ubuntu.com>
Fri, 29 Jan 2021 13:26:15 +0000 (14:26 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Fri, 29 Jan 2021 13:26:15 +0000 (14:26 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/attach.c

index 1b47fdc816029395e04907cda57896d2aa95f96f..2aa963104981f24547cc69f15d4cbb84772ff6f3 100644 (file)
@@ -1351,7 +1351,7 @@ int lxc_attach(struct lxc_container *container, lxc_attach_exec_t exec_function,
        TRACE("Received pid %d of attached process in parent pid namespace", attached_pid);
 
        /* Ignore SIGKILL (CTRL-C) and SIGQUIT (CTRL-\) - issue #313. */
-       if (options->stdin_fd == 0) {
+       if (options->stdin_fd == STDIN_FILENO) {
                signal(SIGINT, SIG_IGN);
                signal(SIGQUIT, SIG_IGN);
        }