hang on exit - bug or no bug?
Markus Friedl
markus at openbsd.org
Sat Oct 6 01:39:08 EST 2001
On Fri, Oct 05, 2001 at 11:06:01AM -0400, Nicolas Williams wrote:
> I can certainly confirm, from experience, that, on Solaris,
>
> rsh host command&
>
> hangs if "command" keeps its stdio open. Rlogin is what others are
> saying doesn't do this, but, so what?
>
> As Lee Eakin explained yesterday, there's things SSH does that RLOGIN
> doesn't, such as agent forwarding, X forwarding, port forwarding, all
> of which may or may not be needed by that background command that's
> still holding its stdio open.
the hang-on-exit problem is not related to forwarding.
> Perhaps there should be an option, that causes SSHD to exit when its
> child exits and the session was a TTY session, and to hell with grand-
> children's stdio. But the conservative behaviour needs to be available
> too.
perhaps it's acceptable to discard data for sessions with ttys,
but i'm not sure yet.
session.c:session_exit_message()
if (c->ostate != CHAN_OUTPUT_CLOSED)
chan_write_failed(c);
+ if (s->ttyfd != -1 && option.discard && c->istate == CHAN_INPUT_OPEN)
+ chan_read_failed(c);
s->chanid = -1;
should help.
-m
More information about the openssh-unix-dev
mailing list