Project

General

Profile

Bug #12257

io/wait: wait_readable/writable working different than IO.select when descriptor not open

Added by chucke (Tiago Cardoso) almost 3 years ago.

Status:
Open
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:74840]

Description

Coming from this pending issue:

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

Gist of it:

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

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.

Also available in: Atom PDF