Channels API question (was Re: hang on exit bug under Linux)

Nicolas Williams Nicolas.Williams at ubsw.com
Sat Jan 12 08:01:14 EST 2002


On Fri, Dec 14, 2001 at 06:10:59PM +0100, Peter Stuge wrote:
> Ok.  Here we go.  It's not very complicated but it took me some time to get
> familiar with all the code, which is very easy to read, kudos to all!
> And after finishing it, I fell alseep.  Ohwell.
> 
> For this to work as desired the sshd must send the SSH_MSG_CHANNEL_CLOSE
> message fast enough for the client to buffer it together with the
> CHANNEL_REQ "exit-status", so that CHAN_CLOSE_RCVD is set in the channel
> flags when client_process_buffered_input_packets() returns.  If this isn't
> acceptable/practical the only alternative I can see is to set a time limit.

Ok, I'm coming back to this.

1. I think that you should really be patching client_input_channel_req()
   where it checks for "exit-status" so that appropriate action is
   taken.

2. I'm not sure how best to force quitting and I have failed to
   understand what Markus has said.

   Should the code set quit_pending=1?

   Or should channel_input_ieof() and what not to close the session's
   channel? And how is that best accomplished? How to force the other
   channels to close?

> //Peter
> 
> -- 
> irc: CareBear\
> irl: Peter Stuge

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