diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-30 10:32:51 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-30 10:32:51 +0000 |
commit | 7010dcef9bafada7d1f47c5bd98d3fbb2fb0ae9d (patch) | |
tree | c93edba94b9297f95acc7e14c91f065625ea1538 /test | |
parent | e8f6d8493678a828ae345f86c680601d2661442a (diff) |
merges r21181 from trunk into ruby_1_9_1.
* process.c (rb_waitpid): retries waitpid when EINTR.
[ruby-core:19744].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_process.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb index 5a95a52f0b..072e7742dc 100644 --- a/test/ruby/test_process.rb +++ b/test/ruby/test_process.rb @@ -1010,4 +1010,16 @@ class TestProcess < Test::Unit::TestCase def test_pst_inspect assert_nothing_raised { Process::Status.allocate.inspect } end + + def test_wait_and_sigchild + signal_received = [] + Signal.trap(:CHLD) { signal_received << true; puts "child died" } + pid = fork { sleep 1; exit } + Thread.start { raise } + Process.wait pid + sleep 2 + assert_equal [true], signal_received, " [ruby-core:19744]" + ensure + Signal.trap(:CHLD, 'DEFAULT') + end end |