diff options
Diffstat (limited to 'bootstraptest/test_fork.rb')
-rw-r--r-- | bootstraptest/test_fork.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/bootstraptest/test_fork.rb b/bootstraptest/test_fork.rb index d9e92c7a6b..384294727f 100644 --- a/bootstraptest/test_fork.rb +++ b/bootstraptest/test_fork.rb @@ -47,3 +47,23 @@ assert_equal 'ok', %q{ :ok end }, '[ruby-core:28924]' + +assert_equal '[1, 2]', %q{ + a = [] + trap(:INT) { a.push(1) } + trap(:TERM) { a.push(2) } + pid = $$ + begin + fork do + sleep 0.5 + Process.kill(:INT, pid) + Process.kill(:TERM, pid) + end + + sleep 1 + a.sort + rescue NotImplementedError + [1, 2] + end +}, '[ruby-dev:44005] [Ruby 1.9 - Bug #4950]' + |