]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
attach: fix logging for stdfd replacement
authorChristian Brauner <christian.brauner@ubuntu.com>
Mon, 1 Feb 2021 13:50:55 +0000 (14:50 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 1 Feb 2021 13:50:55 +0000 (14:50 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/attach.c

index 82e9d9a47ff6b2982ef5824d619a207fa207fa43..3dc5b1a10059021699593f554c4dc675b0080a10 100644 (file)
@@ -1134,11 +1134,11 @@ __noreturn static void do_attach(struct attach_payload *ap)
 
        if (options->stdout_fd >= 0 && options->stdout_fd != STDOUT_FILENO)
                if (dup2(options->stdout_fd, STDOUT_FILENO))
-                       SYSDEBUG("Failed to replace stdout with %d", options->stdin_fd);
+                       SYSDEBUG("Failed to replace stdout with %d", options->stdout_fd);
 
        if (options->stderr_fd >= 0 && options->stderr_fd != STDERR_FILENO)
                if (dup2(options->stderr_fd, STDERR_FILENO))
-                       SYSDEBUG("Failed to replace stderr with %d", options->stdin_fd);
+                       SYSDEBUG("Failed to replace stderr with %d", options->stderr_fd);
 
        /* close the old fds */
        if (options->stdin_fd > STDERR_FILENO)