[lkml]   [2007]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: SELECT() returns 1 But FIONREAD says (Input/output error)
David Schwartz wrote:
>> David Schwartz wrote:
>>> Nope. An errored connection is always ready for read/write -- there is
>>> nothing to wait for as far as the kernel is concerned. Your code keeps
>>> asking the kernel if something interesting has happened, the
>>> kernel keeps
>>> telling it yes, and it refuses to do anything about it.
>> The select() returns because i pulled the USB cable from hub. Seems
>> reasonable.
> Good. Then there is nothing further to discuss.
>> The next select() found what? to be interesting in order to prematurely
>> terminate the select-wait? As far as I can tell, nothing interesting has
>> happened since the previous select(). In this case the select() is only
>> looking at read()'s.
> You have a very serious misunderstanding of what 'select' does. The 'select'
> function is level triggered and state based, not edge triggered or event
> based. The situation was the same as before, and so the same result is
> required.

The misunderstanding is from the docs.
The select() does not report device errors.
Select will just "more precisely, to see if a read will not block".

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-06-01 19:11    [W:0.058 / U:4.260 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site