ssh host echo bla | echo bla

Nicolas Williams Nicolas.Williams at ubsw.com
Wed Dec 19 08:37:07 EST 2001


On Wed, Dec 19, 2001 at 12:16:55AM +0300, Michael Tokarev wrote:
> Carson Gaspar wrote:
> []
> > It _seems_ like people are saying that since stdout has been closed, ssh
> > shouldn't bother connecting. As my above example shows, stderr _is_ still
> > connected, and can still receive useful data. Please be _very_ careful
> > before you mess with this.
> 
> Ops -- this is another point of view and a direction.  For me, that was
> obvious that ssh should NOT depend on it's environment (i.e. are filedescr.
> opened or not), but it should ALWAYS do what it was asked for, and print
> any error message as appropriate.  I.e. for me, the -2 behaviour was
> incorrect, not -1 one.
> 
> Well, what to do if we can't write error message is totally different
> story (well, ignoring errors while printing error messages seems to be
> a good way).  But ssh should do what it has been asked to, or attempt to
> do that -- it should NEVER try to "optimize" it's work by e.g. eliminating
> connection attempt if e.g. stdout is closed.  That to say -- I think that
> ssh should "reinvent" the -1 behaviour (correct from my view) to -2 variant
> (i.e. do what it was asked for and print any error message), but NOT the
> reverse.

Why not? I think exiting when stdout or stderr are broken is fine, as
long as it's documented. :)

Deadlocking is not.

> Regards,
>  Michael.


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