On Saturday 19 of September 2009 21:56:57 Peter Stuge wrote:
> Kamil Dudka wrote:
> > > Daniel says that the io operation can in fact block anyway, when the
> > > socket is in blocking mode.
> >
> > Can you reference any specification saying otherwise?
>
> Do man pages count? I've quoted a few, earlier in the thread. Mikhail
> also quoted SUSv3 IIRC, which seemed to agree with the Linux select(2)
> man page.
>
> --8<-- Linux select(2)
> DESCRIPTION
>        select() and pselect() allow a program to monitor multiple file
>        descriptors, waiting until one or more of the file descriptors
> become "ready" for some class of I/O operation (e.g., input possible). A
> file descriptor is considered ready if it is possible to perform the corre‐
> sponding I/O operation (e.g., read(2)) without blocking.
> -->8--
>
> The paragraph "Select Law" in Linux select_tut(2) clarifies a little
> further.

Sorry, I've overlooked that quotation ... but I am not sure if it says
what you need to hear either.

"socket ready" means it's *possible* to perform the I/O operation without 
blocking. IMO it does not *guarantee* it actually happens. But take it
only as my opinion, I've been never good in the modal logic ;-)

And to be frank, I've never used select(2) myself beyond some dummy school 
projects.

Kamil
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

Reply via email to