lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-id: <465F891B.1080103@shaw.ca>
Date:	Thu, 31 May 2007 20:48:59 -0600
From:	Robert Hancock <hancockr@...w.ca>
To:	Uncle George <netbeans@...works.com>
Cc:	davids@...master.com, linux-kernel@...r.kernel.org
Subject: Re: SELECT() returns 1 But FIONREAD says (Input/output error)

Uncle George 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.
> 
> 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.

It's because you haven't done anything to handle the error which is 
still persisting. Likely the only thing sane you can do in this case is 
close the fd and try to reopen it later.

-- 
Robert Hancock      Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@...pamshaw.ca
Home Page: http://www.roberthancock.com/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ