>You set a socket fd to nonblocking with:
>    fcntl(fd, F_SETFL, O_NONBLOCK);
>

IMHO this is NOT the right way to set non-blocking IO, you are overwriting
any other socket flags. Consider the following code:

rc = fcntl( fd, F_GETFL, 0);
if ( rc != -1)
   fcntl( fd, F_SETFL, rc | O_NONBLOCK);
else
   fcntl( listenfd, F_SETFL, O_NONBLOCK);

Eli

"There's so many different worlds
 So many different suns
 And we have just one world
 But we live in different ones.."
 
 - Dire Straits




=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to