so-called-hang-on-exit

Nicolas.Williams at ubsw.com Nicolas.Williams at ubsw.com
Wed Aug 7 03:48:34 EST 2002


I meant, what is the difference in behaviour in technical terms.

E.g., "the BSD pty master gets EOF as soon as all processes in the pty's
controlling process group exit, whereas on Linux the pty master EOFs
only when there are no open file descriptors for the pty."

And what server-side, user-level heuristic could "correct" for this
difference?

Cheers,

Nico
-- 

> -----Original Message-----
> From: Craig J Copi [mailto:cjc5 at po.cwru.edu]
> Sent: Tuesday, August 06, 2002 1:19 PM
> To: Williams, Nicolas
> Cc: openssh-unix-dev at mindrot.org
> Subject: Re: so-called-hang-on-exit 
> 
> 
> Nicolas.Williams at ubsw.com writes:
> >
> >What's the difference, again?
> 
> Using the following test:
> #> ssh machinename
> #> (sleep 10; echo hi) &
> #> exit
> 
> I get the following results.
> H == Hang, wait for sleep, print hi, then exit
> NH == Exit immediately (hi not printed)
> 
> client\server |  Linux  | OpenBSD
> --------------+---------+--------
> Linux         |    H    |  NH
> OpenBSD       |    H    |  NH
> 
> 
> Using the following test:
> #> ssh machinename '(sleep 10; echo hi) &'
> 
> I get the following results.
> 
> client\server |  Linux  | OpenBSD
> --------------+---------+--------
> Linux         |    H    |  H
> OpenBSD       |    H    |  H
> 
> Note:
> Linux == RH7.3 w/updates
> OpenBSD == 3.1 w/updates
> OpenSSH 3.4[p1] w/privsep running on test machines.
> 
> So why does this happen.  People seem to expect the OpenBSD behavior
> eventhough you don't get the "hi" printed in the first test case.
> 
> Craig
> 

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