> Stefan Praszalowicz wrote: > in pth_high.c, function pth_connect_ev, line 499, there is > > >> if (rv == -1 && errno == EINPROGRESS > >> && fdmode != PTH_FDMODE_NONBLOCK) > > while PTH_FDMODE_NONBLOCK has been set earlier.
Yes, but so what? The variable "fdmode" is being checked, not the current blocking state of the file descriptor. Note that pth_fdmode() returns the old state. > Maybe there's something I don't get, but I had a problem with > pth_connect_ev retuning an error, and when I changed the test to > > >> if (rv == -1 && errno == EINPROGRESS) > > it started to work. The logic here is to duplicate that of the normal connect(2) on a non-blocking file descriptor, i.e., quoting connect(2): [EINPROGRESS] The socket is non-blocking and the connection cannot be completed immediately. It is possible to select(2) for completion by selecting the socket for writing. You must have explicitly set your file descriptor to non-blocking. -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]