hang on exit bug under Linux
Nicolas Williams
Nicolas.Williams at ubsw.com
Wed Dec 12 02:49:36 EST 2001
On Tue, Dec 11, 2001 at 02:19:22PM +0100, Markus Friedl wrote:
> On Tue, Dec 11, 2001 at 08:12:32AM -0500, Nicolas Williams wrote:
> > Actually, now I'm convinced that even having the sshd send SIGHUP to the
> > process group when the session leader exits might not be correct.
> >
> > Is it possible to have the client, upon reception of the session exit
> > message, choose to send SIGHUP to the session (meaning the process
> > group) and/or force the channels closed? Is this at all possible in the
> > SSHv2 protocol?
>
> i sent a patch for signal passing. nobody did comment.
>
> i sent a patch for SIGHUP, and got one single comment.
>
> so i guess, nobody cares.
I'm commenting now.
The signal passing patch seems to be for passing signals received by
the ssh client. But I'm talking about the ssh client passing a SIGHUP
upon getting a session exit message from sshd. Is it possible to pass a
signal to that session that just exited at that point? The semantics
would be to killpg() the process group of the session in question - but
the session has exited, ergo there's a chicken-and-the-egg problem and
I'm not familiar enough with the protocol to know if it's even doable.
The killpg() patch, on second thought, is probably not good, on the
grounds that it should be the client that decides such things. You have
succeeded in convincing me of this :) which is why I'm suggesting that
the client have an option for passing SIGHUP to sessions as they exit
and/or close their channels as the sessions exit. E.g.,
hostA% ssh -o nohang hostB
hostB% sleep 150 &
hostB% exit
<ssh passes SIGHUP, closes channels for session, unused forwarded
agent/x11, sshd exits>
hostA%
Without -o nohang the behaviour would be as now.
> -m
Nico
--
-DISCLAIMER: an automatically appended disclaimer may follow. By posting-
-to a public e-mail mailing list I hereby grant permission to distribute-
-and copy this message.-
Visit our website at http://www.ubswarburg.com
This message contains confidential information and is intended only
for the individual named. If you are not the named addressee you
should not disseminate, distribute or copy this e-mail. Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.
E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses. The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission. If
verification is required please request a hard-copy version. This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.
More information about the openssh-unix-dev
mailing list