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

Alexandre Julliard julliard at winehq.org
Wed Nov 1 13:38:14 CST 2006


Juan Lang <juan_lang at yahoo.com> writes:

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

A single file descriptor can still be above 1024. select() should
really be avoided.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list