Hi, We recently upgraded OpenSSH from 7.5p1 to 8.0p1, and received a report that there was a behavioral differences where the ssh session did not disconnect after a remote background command execution. For example, "ssh user@xxxxxxxxxxx 'tail -f /var/xxx &' After looking at the debug logs and comparing the code, it seems there was a bug in the portable version during the adaptation of the 1.367 change (refactoring) of channels.c. The OpenBSD version looks correct, but for the portable version, the exit condition of channel_handle_efd_read() didn't get converted correctly, but somehow got copy-and-pasted from the rfd version. I couldn't find the change history for the portable version, so I can't when/how this happened. This should make the "force" condition the same as before the refactoring of the portable version of channels.c. --- /tmp/tmp.48415.39 2019-08-19 19:24:29.000000000 -0700 +++ crypto/openssh/channels.c 2019-08-19 19:19:39.000000000 -0700 @@ -2103,7 +2103,15 @@ channel_handle_efd_read(struct ssh *ssh, ssize_t len; int r, force; + force = c->detach_close; - force = c->isatty && c->detach_close && c->istate != CHAN_INPUT_CLOSED; if (c->efd == -1 || (!force && !FD_ISSET(c->efd, readset))) return 1; --- Thanks. Hong. _______________________________________________ openssh-unix-dev mailing list openssh-unix-dev@xxxxxxxxxxx https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev