Does the `select.2` ignore the `O_NONBLOCK`?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michael,
Is the assumption correct that `select.2` ignores the `O_NONBLOCK`
flag in the file descriptors it operates on?

Details:
I assume that `select.2`
(http://man7.org/linux/man-pages/man2/select.2.html) completely
ignores the fact that some (or all) of the file descriptors (the
`select.2` operates on) can be marked as non-blocking (O_NONBLOCK).

I mean if
+ the `select()` is called for a single socket,
+ and that socket is non-blocking,
+ and the `select()` time-out is non-zero,
then
+ `select()` will not return immediately (returning (-1) and `errno`
equal to `EWOULDBLOCK` or `EAGAIN`)
+ but will be suspended for the duration of the `select()` time-out.

If the assumption is correct then it would save me some time if I saw
an explicit note about that in
http://man7.org/linux/man-pages/man2/select.2.html.

Robin Kuzmin
kuzmin.robin@xxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux