Difference between select() and fcntl() Difference between select() and fcntl() unix unix

Difference between select() and fcntl()


  1. If select() times out but you go to read a blocking file descriptor that is not ready, then you will block. The call to select() does not affect the behaviour of the file descriptor at all.

  2. If data is ready immediately, the select() call will return immediately. If the data is ready after 1 second, the select() call will return after 1 second. It will only return after 10 seconds if no data was ready during that time (or if the data arrived just fractionally before the timeout occurred).