sshd hangs on logout -- is this a bug?

Markus Friedl markus at openbsd.org
Wed Sep 12 22:42:54 EST 2001


On Wed, Sep 12, 2001 at 02:36:02PM +0200, Sturle Sunde wrote:
> Markus Friedl <markus at openbsd.org> writes:
> > On Fri, Sep 07, 2001 at 01:16:43AM +0200, Sturle Sunde wrote:
> >> [Quoting reformatted for readability]
> >> Nicolas Williams <Nicolas.Williams at ubsw.com> writes:
> >>> On Wed, Sep 05, 2001 at 04:57:51PM -0700, Adam McKenna wrote:
> >>>> 20001129
> >>>>  - (djm) Back out all the serverloop.c hacks. sshd will now hang again
> >>>>    if there are background children with open fds.
> >>> [...]
> >>> This is normal behaviour for RSH and is natural behaviour anyways.
> >>
> >> Not if you enter an interactive session (and rsh become rlogin).
> >> 
> >> If I rsh to a machine, exec bash, sleep 100 & and logout, I get
> >> disconnected immediately.  If I ssh to a machine running OpenSSH 2.9p2
> >> and do the same, I don't get disconnected until the sleep is finished.
> >> SSH.com sshd disconnects immediately in all cases when the shell exits
> >> (like rlogind, not rshd).  This difference in behaviour is very
> >> annoying, and I hoped it would be fixed in the next version.
> > 
> > i think it's not a bug.
> 
> I disagree.  It breaks compability with rlogin and SSH.com ssh.
> 
> > however, i don't see these so called problems on *BSD systems, so
> > perhaps some tty handling on linux/solaris is different (broken?)
> > with regard to close/eof.
> 
> I get the same behaviour on AIX 4.3, IRIX 6.5, HP-UX 10.20 and 11i,
> OSF/DU/Tru64 4.0 and 5.0, Linux and Solaris (tested on 2.6, 7 and 8).
> Looks like normal behaviour to me.

so do you have a fix?

> > please not that recent ssh-1.2.x versions are working just like
> > openssh, i.e. they do what people call 'hang' if the fd's are still
> > used. (and this is IMHO the right way).
> 
> SSH-1.2.27 do not have this problem with any of the tested operating
> systems.  Don't know about newer versions.

ssh-1.2.30 fixed this i think and no longer discards the data.



More information about the openssh-unix-dev mailing list