Subject: Re: [libssh2] code snippet, indented

Re: [libssh2] code snippet, indented

From: Thomas Harding <thomas.harding_at_laposte.net>
Date: Mon, 6 Aug 2007 12:28:22 +0200

On Sun, Aug 05, 2007 at 04:06:55PM +0200, Thomas Harding wrote:
> So, then running this example:
> ./ssh2 127.0.0.1 tom '*****' 'cat xulu' 1 100 >foo
> ^IP ^user ^pass ^command ^display errors if 1 ^if given, poll timeout in ms. If not, running in blocking mode
>
>
> * ./ssh2 127.0.0.1 tom '*****' 'cat xulu' 1 100 >foo
> > display error message. OK
> * ./ssh2 127.0.0.1 tom '*****' 'cat mbox' 1 100 >foo
> > records mbox in foo. OK
> * ./ssh2 127.0.0.1 tom '*****' 'cat xulu; cat mbox; cat mbox' 1 100 >foo
> > display error messages
> > records _partly_ mbox in foo. BAD
> * ./ssh2 127.0.0.1 tom '*****' 'cat xulu; cat mbox; cat xulu' 1 >foo
> or * ./ssh2 127.0.0.1 tom '*****' 'cat mbox' 1 >foo
> > stops while reading stderr. BAD
> * ./ssh2 127.0.0.1 tom '*****' 'cat xulu' 1 >foo
> > display error and quit. OK
> * ./ssh2 127.0.0.1 tom '*****' 'cat mbox' >foo
> > records mbox in foo. OK
         * ./ssh2 127.0.0.1 tom '*****' 'cat xulu; cat mbox; cat xulu' >foo
> never reach EOF

> So, have someone a good method to read both completely stdout and
> stderr?

Joined new code with libssh2 coding style. You can uncomment line #130
to enable trace.

-- 
Thomas Harding


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

_______________________________________________
libssh2-devel mailing list
libssh2-devel_at_lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel

Received on 2007-08-06