summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--bootstraptest/test_fork.rb21
2 files changed, 25 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index d65df98a975..c21ea2f723e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Tue Apr 20 01:03:00 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * bootstraptest/test_fork.rb: add a test for [ruby-core:28924].
+
Tue Apr 20 00:43:03 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* file.c (rb_file_s_extname): skip last directory separators.
diff --git a/bootstraptest/test_fork.rb b/bootstraptest/test_fork.rb
index 60a74e8a227..d9e92c7a6b4 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]'