[PATCH]: Patch to fix hang on exit bug under Linux and add optional exit delay

Ed Phillips ed at UDel.Edu
Fri Nov 16 03:39:51 EST 2001


On Thu, 15 Nov 2001, Markus Friedl wrote:

> Date: Thu, 15 Nov 2001 17:00:13 +0100
> From: Markus Friedl <markus at openbsd.org>
> To: Ed Phillips <ed at UDel.Edu>
> Cc: Gert Doering <gert at greenie.muc.de>,
>      Andreas Hasenack <andreas at conectiva.com.br>, pcpa at conectiva.com.br,
>      openssh-unix-dev at mindrot.org, openssh at openbsd.org
> Subject: Re: [PATCH]: Patch to fix hang on exit bug under Linux and add
>     optional exit delay
>
> On Thu, Nov 15, 2001 at 10:44:51AM -0500, Ed Phillips wrote:
> > I have more of a problem with the case where "I have no processes running
> > in the background and no other child processes of sshd running at all and
> > sshd/ssh fail to exit".  I still get that problem occasionally with
> > 2.9.9p2... sometimes I can use CTRL-C, but sometimes I have to use SIGTERM
> > to get ssh to quit (and thus sshd).
>
> do you have debug output from a more recent ssh?

No.  Is there a known problem with this in 2.9.9p2 that I missed?  This
problem happens very infrequently for me, so maybe the 3.0pX code has that
tiny fix that makes it "never" happen?  Actually, I'm very happy with the
stability of 2.9.9p2 in this respect - so happy in fact that we've
installed it on all the Sun (and a few other brands) servers that we
manage, on many different versions of Solaris on many different size
machines (from SS1+ thru 6800).  Great job guys!  Whooo Hoooo!  It's a
wonder anything gets accomplished with people like me bombarding the
list... ;-)

> > This is problematic... if you are forwarding X11 processes then ssh needs
> > to hang around (or at least fork off a child) to continue to process the X
> > traffic.
>
> we are talking about something completely different.

Okay... sorry.

> > If ssh goes away, SIGPIPE is more likely.  If you really want to end your
> > session, then just kill ssh... the rest of the processes on the server
> > side should go away, shouldn't they?
>
> i sent a patch to the list, for transfering signals over
> the wire, but nobody seemed to care.
>
> e.g. currently for
> 	$ ssh host 'tail -f bla | grep bla'
> 	^C
> tail and grep still run on the remote host.

I understand what you're saying, but I have no idea how it relates to my
response above.  I was talking about the background processes on the
server-side and how they would respond to ssh exiting on the client while
they were still running (and might write to stdout/stderr).  I wasn't
talking about forwarding signals from ssh to the remote process for a
non-interactive invocation of ssh.  Although, that might be a nice feature
for someone... but I say, "If you're silly enough to NOT login and run the
commands, then you shouldn't be wonderin' why you can't stop them with
CTRL-C after you already hit RETURN...". ;-)

	Ed

Ed Phillips <ed at udel.edu> University of Delaware (302) 831-6082
Systems Programmer III, Network and Systems Services
finger -l ed at polycut.nss.udel.edu for PGP public key




More information about the openssh-unix-dev mailing list