LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   select() (https://www.linuxquestions.org/questions/programming-9/select-424004/)

Kroenecker 03-12-2006 12:47 AM

select()
 
1) When looking throught the select() man page, it has the following in the description:

Quote:

Those listed in readfds will be watched to see if characters become available for reading (more precisely, to see if a read will not block; in particular, a file descriptor is also ready on end-of-file.
Does the phrase "if a read will not block" mean that reading from that file descriptor wont cause an error? Basically I'm not sure what block means.

2) Also, when I use select to watch a file descriptor, the time structure allows me to... have my program pause during the select() function call, waiting for an fd to become available??? And if one doesn't become available, then the program continues on?

jlliagre 03-12-2006 01:01 AM

1) block means, wait until something is available for reading, can be forever ...

2) the time structure specifies a timeout after which the call returns, whether data is available or not.


All times are GMT -5. The time now is 11:29 PM.