Re: select() - Linux vs. BSD

From: Mike Castle (dalgoda@ix.netcom.com)
Date: Tue May 29 2001 - 12:34:47 EST


On Tue, May 29, 2001 at 11:55:24AM -0400, John Chris Wren wrote:
> select will not be altered. In Linux, which claims BSD compliancy for this
> in the man page (but does not state either way what will happen to the
> bits), zeros the users bit masks when a timeout occurs. I have written a

Where in the man page does it state this? I just read it and couldn't find
any such statement.

I do, however, find the following:

       exceptfds will be watched for exceptions. On exit, the
       sets are modified in place to indicate which descriptors
       actually changed status.

If there is a time out, it makes sense that no descriptors changed state,
and so everything would be zeroed out.

And actually, the example seems to support this:

           if (retval)
               printf("Data is available now.\n");
               /* FD_ISSET(0, &rfds) will be true. */

The comment seems to indicate that if retval is 0, then FD_ISSET will be
false.

mrc

-- 
       Mike Castle       Life is like a clock:  You can work constantly
  dalgoda@ix.netcom.com  and be right all the time, or not work at all
www.netcom.com/~dalgoda/ and be right at least twice a day.  -- mrc
    We are all of us living in the shadow of Manhattan.  -- Watchmen
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu May 31 2001 - 21:00:40 EST