Archive Index
This month's Index
|
Subject: Re: Strange: libssh2_channel_read() returns 0
Re: Strange: libssh2_channel_read() returns 0
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 1 May 2009 20:38:06 +0200 (CEST)
On Thu, 30 Apr 2009, Jeremy Knope wrote:
> I just tried CVS with my OS X machines, this seems to fix the problem for me
Well, it at least indicates that your problem is similar in nature to this
> Any reason why this blocks but doesn't eventually return?
A blocking read that gets nothing will remain waiting until something comes
> Right now I'm using a call that reads up to 4096 bytes, calls
By doing this you should expect to risk hanging a long time on a read at
> In my test case, I was running a command that produces 879 bytes. When it
Well, if there are more data pending the hang is correct. If there's no more
I suggest you build libssh2 debug-enabled and use libssh2_trace(handle, ~0);
> Is it better to use the non-blocking method maybe? This was how we were
0.13 was eons ago so I don't consider comparisons with that very important.
Of course you can switch to non-blocking mode as then you shouldn't have to
-- / daniel.haxx.se ------------------------------------------------------------------------------ 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. http://p.sf.net/sfu/velocityconf _______________________________________________ libssh2-devel mailing list libssh2-devel_at_lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libssh2-develReceived on 2009-05-01 |