sshd hangs on logout -- is this a bug?
Markus Friedl
markus at openbsd.org
Wed Sep 12 20:37:47 EST 2001
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:
> >> In the changelog, there is an entry:
> >>
> >> 20001129
> >> - (djm) Back out all the serverloop.c hacks. sshd will now hang again
> >> if there are background children with open fds.
> >>
> >> Does this mean that this is regarded as expected (and correct)
> >> behavior, that should not change in the future, or does it mean
> >> that this behavior is a known problem that someone will eventually
> >> fix?
> >
> > 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.
sshd does not discard the data from the backgrounded
process. if the backgrounded process want's ssh to
exit than it should close the fd.
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.
who's looking into this?
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).
-m
More information about the openssh-unix-dev
mailing list