How to get SELECT to return 0?

How to get SELECT to return 0?

Post by GLENN DAVIDS » Thu, 24 Dec 1992 01:15:47



        Forgive my ignorance but I need to determine this since the means by
which the SUN manuals describe do not apply in my case. (ie: Timeout has  
expired) Is there a signal that can be sent from the other process?

---------------------------------------------------------------------------
Glenn Davidson, User Consultant    | New more creative signature in the
Acadia University Computer Centre  | works. Staye tuned for developements.

---------------------------------------------------------------------------

 
 
 

1. Does select() return if the FD changed before select() was called?

Does a select() call return if the file descriptor it is watching changed
before the select() was called if the file descriptor hasn't been read or
written to since the change? For an illustration:

while ( select() ) {
    //Do some stuff here
    //One of the file descriptors select() watches happens to change right
here
    //Do some more stuff

Will select return on the next while() iteration because of the file
descriptor that changed in the middle of the loop? Or will it only watch for
descriptors that change since the select() call was made, which means my
program would block in select() without noticing the change that happened in
the last loop?

The man page doesn't seem to say much about this.

Also, if anyone can recommend any good books on programming TCP
clients/servers on POSIX and/or Win32 systems I'd appreciate it.

LKembel

2. XF86 and matrox g100

3. Select returns data available read returns no data

4. 2.5.10-dj1 compilation failure

5. When do read() return 0 despite that select() returned 1

6. Netscape and delete key

7. select() returns error ECHILD

8. Why does the linux always read my hard disk

9. select() doesn't return on socket descriptor

10. No child process returned as error from connec and select

11. Q: select() returns upon socket connection, or STDIN, but not both

12. socket accept error! as select returns -1

13. Select returning 0