so-called-hang-on-exit

Frank Cusack fcusack at fcusack.com
Wed Aug 7 18:54:46 EST 2002


On Wed, Aug 07, 2002 at 10:50:30AM +0300, Jani Jaakkola wrote:
> On Tue, 6 Aug 2002, Ben Lindstrom wrote:
> > 
> > The question that has yet to be answered is.
> > 
> > *WHY* does it happen on some platforms and not others?  You run OpenSSH on
> > OpenBSD?  No hang.
> 
> Then OpenBSD must already have the data loss problem. Which means that 
> OpenBSD kernel does the decision, that the pty is not needed any more 
> when the pty session master process exits and therefore it is OK to force 
> the pty closed (I vaguely remember that some ancient Linux kernel had 
> the same behaviour, but I might be mistaken).

I think (thought) we've already established this.

Hence my earlier question, what does 'ssh -t 0 "yes & exit"' do on OpenBSD?

> > No one has yet to even explain to us why.  
> 
> This should be easy enough to check from OpenBSD kernel. However since I 
> am a Linux guy I do not have OpenBSD kernel handy would not know where to 
> look.

Lame excuse, you're much too used to Linux.  BSD distros have CVS
repositories, and also use cvsweb.  Now not knowing where to look is
a problem.  :-)

http://www.openbsd.org/cgi-bin/cvsweb/src/sys/kern/kern_exit.c?rev=1.37.2.2&content-type=text/x-cvsweb-markup

linux/kernel/exit.c is the appropriate place to start on Linux.

/fc




More information about the openssh-unix-dev mailing list