Takashi Ishihara wrote:
> using pth_fdmode, set the file descriptor non-block mode works fine if the
> file is regular file (e.g. local files stored in the hard disk).
> When I tried read from socket w/ non-block mode, pth_recv or pth_read fail.
> i.e. return value is always -1. Here's a grep of code. Any help? TIA.
.. and errno is probably EWOULDBLOCK, right? This is correct behavior.
When set to non-blocking, pth will not block the thread when I/O is
not available, but return an error instead.
The reason this doesn't happen with a normal file is that I/O is always
available with a normal file.
-Archie
__________________________________________________________________________
Archie Cobbs * Packet Design * http://www.packetdesign.com
______________________________________________________________________
GNU Portable Threads (Pth) http://www.gnu.org/software/pth/
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager (Majordomo) [EMAIL PROTECTED]