Subject: Re: [libssh2] libssh2_channel_read_stderr always in blocking mode ?

Re: [libssh2] libssh2_channel_read_stderr always in blocking mode ?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 1 Aug 2007 14:08:22 +0200 (CEST)

On Tue, 31 Jul 2007, Thomas Harding wrote:

> My problem is that while using libssh2_channel_read_stderr, it seems to wait
> infinitely for data when no data is available, whatever channel is or is not
> in blocking mode.

Can you please provide a complete small source snippet that reproduces the
problem?

> I (half) solved the problem in non-blocking mode by polling for POLLERR (it
> seems to differs from the unix poll, as POLLERR is normally not significant
> in pollfd struct) "half", because since an error occurs, calling
> libssh2_poll on POLLERR success everytime. In that case, reading for stderr
> sipmly returns nothing (it doesn't block).

Actually, I find very little use for libssh2_poll() at all... When is that
ever useful? Since connections etc already are done outside the library the
application already knows the sockets etc and could just as well just use
regular poll(). Or what am I missing?

-------------------------------------------------------------------------
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-01