https://bugzilla.mindrot.org/show_bug.cgi?id=3312
Damien Miller <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from Damien Miller <[email protected]> --- sshd has no information of what is running in the user session except: 1) SIGCHILD/waitpid() notifications of process exit 2) File descriptors closing sshd does see the notifications of process exit for your example. E.g. if you run in verbose mode (ssh -vvv ...) then you'll see: > debug1: client_input_channel_req: channel 0 rtype exit-status reply 0 But the child process' stderr file descriptor is still open from ssh'd perspective and sshd has no way of knowing whether important information could be coming until the child process closes it. In your case of running nohup - sshd will see that stderr is still open and wait for it to close before finalising the session. > if something in the script were to write to stderr after our sleep has > happened, we shouldn't be displaying that on the client side, since the > nohup ought to prevent things from writing to the screen. This is not entirely correct - nohup will prevent subprocesses from writing to a *TTY*. There is no TTY involved in your example above because ssh does not request one when a command is specified on the command-line. If you change your example to request a TTY then it should exit immediately: ssh -tn user@hostname 'nohup /tmp/dosleep > /dev/null &' -- You are receiving this mail because: You are watching someone on the CC list of the bug. You are watching the assignee of the bug. _______________________________________________ openssh-bugs mailing list [email protected] https://lists.mindrot.org/mailman/listinfo/openssh-bugs
