sshd hangs on logout -- is this a bug?

Sturle Sunde sturle.sunde at usit.uio.no
Wed Sep 12 22:36:02 EST 2001


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.

> 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.


-- 
Sturle      All eyes were on Ford Prefect. Some of them were on stalks.
~~~~~~           -- Douglas Adams, So long, and thanks for all the fish



More information about the openssh-unix-dev mailing list