[ruby-core:74840] [Ruby trunk Bug#12257] io/wait: wait_readable/writable working different than IO.select when descriptor not open

From: cardoso_tiago@...
Date: 2016-04-07 12:49:59 UTC
List: ruby-core #74840
Issue #12257 has been reported by Tiago Cardoso.

----------------------------------------
Bug #12257: io/wait: wait_readable/writable working different than IO.select when descriptor not open
https://bugs.ruby-lang.org/issues/12257

* Author: Tiago Cardoso
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: 
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
Coming from this pending issue:

https://github.com/net-ssh/net-ssh/pull/303

Gist of it:

<pre>
f = IO.popen("/bin/sh","r+")
f.close_write
f.wait_writable #=> IOError: not opened for writing
IO.select(nil,[f],nil,10) #=> no error
</pre>

The way I see it, it should have the same behaviour, i.e. either IO.select should complain, or wait_writable should just return nil. 





-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next