summaryrefslogtreecommitdiff
path: root/bootstraptest
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-19 16:03:39 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-19 16:03:39 +0000
commitab10ac8f12f7a903ab5d6c96983f6b9073441468 (patch)
tree35246ca07db9f06b669b7e9132c6ba8127e8507f /bootstraptest
parentcb508fe7397a6054a45cac11cf3e865f13f24aea (diff)
* bootstraptest/test_fork.rb: add a test for [ruby-core:28924].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest')
-rw-r--r--bootstraptest/test_fork.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/bootstraptest/test_fork.rb b/bootstraptest/test_fork.rb
index 60a74e8a22..d9e92c7a6b 100644
--- a/bootstraptest/test_fork.rb
+++ b/bootstraptest/test_fork.rb
@@ -26,3 +26,24 @@ assert_normal_exit(<<'End', '[ruby-dev:37934]')
Process.setrlimit(:NPROC, 1)
fork {}
End
+
+assert_equal 'ok', %q{
+ begin
+ if pid1 = fork
+ sleep 1
+ Process.kill("USR1", pid1)
+ _, s = Process.wait2(pid1)
+ s.success? ? :ok : :ng
+ else
+ if pid2 = fork
+ trap("USR1") { Time.now.to_s }
+ Process.wait2(pid2)
+ else
+ sleep 2
+ end
+ exit 0
+ end
+ rescue NotImplementedError
+ :ok
+ end
+}, '[ruby-core:28924]'