mirror of
https://github.com/ruby/ruby.git
synced 2025-09-19 18:43:59 +02:00
* process.c (rb_waitpid): retries waitpid when EINTR.
[ruby-core:19744]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c7e236efc1
commit
b3ff7eb3ef
3 changed files with 21 additions and 5 deletions
|
@ -1044,4 +1044,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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue