www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples | github

Archive Index This month's Index

Subject: Re: Getting stream data in order received

Re: Getting stream data in order received

From: Alexander Lamaison <swish_at_lammy.co.uk>
Date: Sun, 11 Mar 2012 10:58:16 +0000

On 11 March 2012 06:22, Mitchell Hashimoto <mitchell.hashimoto_at_gmail.com> wrote:
> I'm executing a remote program that sends output to both stdout/stderr. Is
> there a way in libssh2 to receive the output in the order it arrived, rather
> than as one giant buffer on stdout, then another on stderr, since this is
> causing out of order results.

That's always going to be a problem, even when you execute the program
locally. stdout is buffered and stderr isn't so they don't stay in
sync. See http://www.pixelbeat.org/programming/stdio_buffering/ for
more. But this is a general unix process issue, nothing to do with


Swish - Easy SFTP for Windows Explorer (http://www.swish-sftp.org)
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2012-03-11

the libssh2 team