mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test/ruby/test_io.rb: use IO#nonblock=
* test/ruby/test_io.rb (test_readpartial_locktmp): use IO#nonblock= Old fcntl invocation may drop necessary flags on some platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c3c1d6c60d
commit
f4ed799b35
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Sat Sep 6 08:10:44 2014 Eric Wong <e@80x24.org>
|
||||
|
||||
* test/ruby/test_io.rb (test_readpartial_locktmp): use IO#nonblock=
|
||||
Old fcntl invocation may drop necessary flags on some platforms.
|
||||
|
||||
Sat Sep 6 07:46:51 2014 Eric Wong <e@80x24.org>
|
||||
|
||||
* test/ruby/test_io.rb (test_readpartial_locktmp): avoid EBADF
|
||||
|
|
|
@ -2867,7 +2867,7 @@ End
|
|||
th = nil
|
||||
with_pipe do |r,w|
|
||||
begin
|
||||
r.fcntl(Fcntl::F_SETFL, Fcntl::O_NONBLOCK)
|
||||
r.nonblock = true
|
||||
th = Thread.new {r.readpartial(100, buf)}
|
||||
|
||||
Thread.pass until th.stop?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue