Commit b538481a by Stéphane Graber

Skip control tty code for non-ttys

parent b870f8d8
...@@ -985,7 +985,7 @@ static int attach_child_main(void* data) ...@@ -985,7 +985,7 @@ static int attach_child_main(void* data)
new_gid = options->gid; new_gid = options->gid;
/* setup the control tty */ /* setup the control tty */
if (options->stdin_fd) { if (options->stdin_fd && isatty(options->stdin_fd)) {
if (setsid() < 0) { if (setsid() < 0) {
SYSERROR("unable to setsid"); SYSERROR("unable to setsid");
shutdown(ipc_socket, SHUT_RDWR); shutdown(ipc_socket, SHUT_RDWR);
......
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