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

Gert Doering gert at greenie.muc.de
Fri Nov 16 04:04:24 EST 2001


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).

gert
-- 
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             gert at greenie.muc.de
fax: +49-89-35655025                        gert.doering at physik.tu-muenchen.de



More information about the openssh-unix-dev mailing list