select() on sockets considered harmful, use poll() instead?

Juan Lang juan_lang at yahoo.com
Wed Nov 1 10:05:23 CST 2006


Dan wrote:
> The suspect statements are:
>
> dinput/joystick_linux.c:      if (1>select(This->joyfd+1,&readfds,...
> dinput/joystick_linuxinput.c: if (1>select(This->joyfd+1,&readfds,...
> icmp/icmp_main.c:             while ((res=select(icp->sid+1,&fdr,...
> netapi32/nbt.c:               r = select(fd + 1, &fds, ...
> wininet/internet.c:           if (select(nSocket+1,&infd,...
> wininet/netconnection.c:      if
(select(connection->socketFD+1,&infd,...

These, at least, are safe:  they poll on a single file descriptor.

> ws2_32/socket.c:              if( (highfd = select(highfd + 1, p_read,
p_write, p_except, timeoutaddr))

This is the only potentially problematic one, but I didn't look at it
closely enough to know for sure.
--Juan


 
__________________________________________________________________________________________
Check out the New Yahoo! Mail - Fire up a more powerful email and get things done faster. 
(http://advision.webevents.yahoo.com/mailbeta) 




More information about the wine-devel mailing list