hang on exit
Frank Cusack
fcusack at fcusack.com
Thu Feb 14 08:51:53 EST 2002
On Wed, Feb 13, 2002 at 10:30:07PM +0100, Markus Friedl wrote:
> On Wed, Feb 13, 2002 at 01:15:42PM -0800, Frank Cusack wrote:
> > On Mon, Feb 04, 2002 at 08:32:26PM +0100, Markus Friedl wrote:
> > > untested, as i don't have access to a system that
> > > shows the hang-on-exit problem.
> >
> > > + options->allow_data_loss_on_pty = -1;
> >
> > Can someone explain why this has been discouraged for a long time based
> > on it "allowing data loss", when on obsd it does this by default?
>
> are you talking about the kernel?
I guess so. My understanding (from reading this list) is that the openbsd
kernel does something different for children of an exiting sshd and while
this patch implements an option for Linux (and perhaps other OSes), on
openbsd this is always the behaviour. Is this correct?
> > It
> > is my understanding that a patch like this has not made it into the distro
> > because of concerns that an active background process might have data to
> > send us.
>
> all other patches did discard data for the non-pty case, too, and this
> is not acceptible.
Ahh, that is a notable distinction. What does openbsd do for the non-pty
case?
> nobody can tell us why sshd receives an EOF when reading from a pty if
> there are backgrounded processes on BSD systems and not on other
> systems.
ahh... I will try to investigate this, but don't expect anything.
Hopefully folks on this list can answer this.
> i sent this patch to so people can test whether discarding data
> would indeed help for the hang-on-exit problem, so that we can
> decide whether we do this by default. this would match the telnetd
> behaviour, but sshd != telnetd, and i really don't like the idea
> of loosing data.
Neither do I. I just rewrote a bunch of scripts used locally to explicitly
redirect /dev/null for fd {0,1,2}, which seems more correct, IMHO. I'll
put this patch into production and give some feedback in a month or so.
/fc
More information about the openssh-unix-dev
mailing list