The use of the select statement in omapi/dispatch.c

Ted Lemon Ted.Lemon at nominum.com
Thu Aug 22 22:59:13 UTC 2002


> The select statement below is used in the code and I think one of the
> parameters is incorrect, or incorrect in non unix systems. The timeout
> variable should be passed by address and the way it is written we are
> passing a 0 address which would tell the select code to go to location 0 
> to
> get the timeout value. As I recall, under unix systems, programs are
> protected from using address 0 by the fact that a 0 is always in location 
> 0.

The select system call is supposed to take a timeout pointer value of zero 
to mean no timeout, not timeout immediately.   If your operating system 
does not support this, it's not compatible.   select is a bsd thing, and 
AFAIK is not included in POSIX, so this isn't a terrible faux pas, but the 
problem is with the operating system, not the code in dispatch.c.



More information about the dhcp-hackers mailing list