UNIX: difference between select and poll

Showing Answers 1 - 1 of 1 Answers

Surya

  • Feb 20th, 2006
 

The basic difference is that select()'s fd_set is a bit mask and   therefore has some fixed size.  It would be possible for the kernel to   not limit this size when the kernel is compiled, allowing the   application to define FD_SETSIZE to whatever it wants but it takes more work. 4.4BSD's kernel and the Solaris library function both have this limit.
With poll(), however, the user must allocate an array of pollfd  structures, and pass the number of entries in this array, so there's  no fundamental limit.  As Casper notes, fewer systems have poll() than  select. 

 

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions