When ssh transport process dies (e.g. if remote side hangs up), the user does not learn about it, until they try to execute the next remote command. The sftp process has this information available; it would be prudent to let the user know.
Created attachment 2982 [details] Notify user, when ssh transport process dies
Alternatively, sftp process could just quit, when the underlying ssh process goes away. There is very little it can do anyway.
If #2718 is implemented, this issue gets more visible.
I think the patch as it stands will break the '!' shell-out command. That's easy enough to fix local_do_shell() to reset the signal handler for it's business. I wonder if there's some nicer way of informing though, but it seems tricky with libedit in the way...
Hi Damien, Thanks for looking at the patch. I don't think it is harmful for '!' commands. The SIGCHLD handler doesn't do anything, if the departed child was not the transport ssh process. Reseting the handler would not be wrong, but I don't think it is necessary. Thanks, Tomas
Created attachment 3002 [details] slightly tweaked A couple of small tweaks to the original diff: Made it apply cleanly (your tree seems to have some additional signal() calls) WNOWAIT doesn't seem to be POSIX and certainly isn't available on BSD move a comment.
Move to OpenSSH 7.8 tracking bug
This was committed a few weeks back. It will be in the OpenSSH 7.8 release.
closing resolved bugs as of 8.6p1 release