* thread.c (rb_thread_select): fix a typo to initialize efds
properly. [Bug #5299] [ruby-core:39380] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fa5446f14e
commit
61b062ba6d
@ -1,3 +1,8 @@
|
|||||||
|
Fri Sep 9 10:22:03 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* thread.c (rb_thread_select): fix a typo to initialize efds
|
||||||
|
properly. [Bug #5299] [ruby-core:39380]
|
||||||
|
|
||||||
Fri Sep 9 02:02:09 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
|
Fri Sep 9 02:02:09 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
|
||||||
|
|
||||||
* template/yarvarch.ja:
|
* template/yarvarch.ja:
|
||||||
|
@ -23,6 +23,17 @@ class TestOldThreadSelect < Test::Unit::TestCase
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_old_select_error_timeout
|
||||||
|
bug5299 = '[ruby-core:39380]'
|
||||||
|
with_pipe do |r, w|
|
||||||
|
t0 = Time.now
|
||||||
|
rc = IO.old_thread_select(nil, nil, [r.fileno], 0.001)
|
||||||
|
diff = Time.now - t0
|
||||||
|
assert_equal 0, rc, bug5299
|
||||||
|
assert_operator diff, :>=, 0.001, "returned too early"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def test_old_select_read_write_check
|
def test_old_select_read_write_check
|
||||||
with_pipe do |r, w|
|
with_pipe do |r, w|
|
||||||
w.syswrite('.')
|
w.syswrite('.')
|
||||||
@ -63,7 +74,7 @@ class TestOldThreadSelect < Test::Unit::TestCase
|
|||||||
assert_equal 0, rc
|
assert_equal 0, rc
|
||||||
assert_equal true, thr.value
|
assert_equal true, thr.value
|
||||||
assert_not_equal false, received, "SIGINT not received"
|
assert_not_equal false, received, "SIGINT not received"
|
||||||
ensure
|
ensure
|
||||||
trap(:INT, "DEFAULT")
|
trap(:INT, "DEFAULT")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user