Subject: Re: Strange: libssh2_channel_read() returns 0

Re: Strange: libssh2_channel_read() returns 0

From: Daniel Stenberg <>
Date: Thu, 30 Apr 2009 00:03:23 +0200 (CEST)

On Wed, 29 Apr 2009, double wrote:

> Exec "uptime" on a remote machine (LAN) does not return the "stdout" output,
> if "libssh2_channel_read()" is not called fast enough. Instead,
> "libssh2_channel_read()" returns zero.
> This issue may be reproduced via the attached c-file. If the "sleep(3)"
> right before "libssh2_channel_read()" is removed, everything works fine.

Ouch. It does indeed look like a bug. I'll try to get some time to look into

Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3.
libssh2-devel mailing list
Received on 2009-04-30