[PATCH]: Patch to fix hang on exit bug under Linux and add optional exit delay
Nicolas Williams
Nicolas.Williams at ubsw.com
Fri Nov 16 05:51:45 EST 2001
On Thu, Nov 15, 2001 at 06:04:24PM +0100, Gert Doering wrote:
> hi,
>
> On Thu, Nov 15, 2001 at 11:56:16AM -0500, Nicolas Williams wrote:
> > On Thu, Nov 15, 2001 at 05:22:58PM +0100, Gert Doering wrote:
> > > On Thu, Nov 15, 2001 at 08:55:07AM -0500, Peter W wrote:
> > > > And the problem with simply killing the ssh client application is?
> > > I assume that you're talking about the *children*, not the ssh client.
> > >
> > > Problem is: you don't know who they are.
> >
> > Yes you do: you know their process group and session id. And the pty
> > knows who the current process group is. Kill -HUP the process group of
> > session(s) being abandoned by the client, send HUP to the pty process
> > groups via the ptys still open, close them ptys.
> >
> > No?
>
> No. A program could have done setsid() and started a new process
> group - think of daemons that do all that daemons should do, but forget
> to close stderr (because of stupid programming bugs in binary-only
> software - whatever "not easily fixable" reason there might be).
Of course, yes, but such programs usually dissasociate from their
controlling tty too.
Even if they don't, killing those process groups is *still* worthwhile.
> gert
Cheers,
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