Nicolas Williams Nicolas.Williams at
Tue Feb 5 08:35:45 EST 2002

On Mon, Feb 04, 2002 at 10:09:42PM +0100, Markus Friedl wrote:
> On Mon, Feb 04, 2002 at 03:00:19PM -0500, Nicolas Williams wrote:
> ^^ there is no channel for ssh1
> in ssh1 login sessions are different from, say, tcp-fwded channels.

Ok, I'll make this just background and not detach for ssh1.

> i don't like the \004 magic in the current code.

Yeah, I just copied it. I didn't get why it was there. I'll not use it.

> > 		chan_read_failed(c);
> > 		chan_write_failed(c);
> ^^^ you cannot call chan_xxx_failed for every channel state,

I see that. I can easily add a check.

In any case, a chan_wont_read() / chan_wont_write() API could work like
chan_*_failed() but not call error() if the channel is not in an
appropriate state. And a  chan_wont_*() API would produce appropriate
debug messages.

> 	please check

How can I view that on Solaris? Groff comes close to producing the right
PS output, but no cigar.

> > 		channel_close_fds(c);
> you still want to keep the channel? why?

No, I don't. Why does forkoff() calling channel_close_fds(c) make you
think I want to keep the channel?

In any case, channel_close_fds(c) closes the dups of the stdio fildes
here, which is something I need done in order to properly detach.

> > 		fd = open(_PATH_DEVNULL, O_RDWR, 0);
> > 		(void) setsid();
> i'm not sure this works like expected.

What? The open(devnull)/dup2()/setsid() bits? Why wouldn't it? It sure
does in my testing.


-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

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