attach: log failues to dup2() with SYSDEBUG()

parent 7e90889d
...@@ -1130,15 +1130,15 @@ __noreturn static void do_attach(struct attach_payload *ap) ...@@ -1130,15 +1130,15 @@ __noreturn static void do_attach(struct attach_payload *ap)
*/ */
if (options->stdin_fd >= 0 && options->stdin_fd != STDIN_FILENO) if (options->stdin_fd >= 0 && options->stdin_fd != STDIN_FILENO)
if (dup2(options->stdin_fd, STDIN_FILENO)) if (dup2(options->stdin_fd, STDIN_FILENO))
DEBUG("Failed to replace stdin with %d", options->stdin_fd); SYSDEBUG("Failed to replace stdin with %d", options->stdin_fd);
if (options->stdout_fd >= 0 && options->stdout_fd != STDOUT_FILENO) if (options->stdout_fd >= 0 && options->stdout_fd != STDOUT_FILENO)
if (dup2(options->stdout_fd, STDOUT_FILENO)) if (dup2(options->stdout_fd, STDOUT_FILENO))
DEBUG("Failed to replace stdout with %d", options->stdin_fd); SYSDEBUG("Failed to replace stdout with %d", options->stdin_fd);
if (options->stderr_fd >= 0 && options->stderr_fd != STDERR_FILENO) if (options->stderr_fd >= 0 && options->stderr_fd != STDERR_FILENO)
if (dup2(options->stderr_fd, STDERR_FILENO)) if (dup2(options->stderr_fd, STDERR_FILENO))
DEBUG("Failed to replace stderr with %d", options->stdin_fd); SYSDEBUG("Failed to replace stderr with %d", options->stdin_fd);
/* close the old fds */ /* close the old fds */
if (options->stdin_fd > STDERR_FILENO) if (options->stdin_fd > STDERR_FILENO)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment