ruby-changes:15503
From: mame <ko1@a...>
Date: Tue, 20 Apr 2010 01:03:55 +0900 (JST)
Subject: [ruby-changes:15503] Ruby:r27405 (trunk): * bootstraptest/test_fork.rb: add a test for .
mame 2010-04-20 01:03:39 +0900 (Tue, 20 Apr 2010) New Revision: 27405 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=27405 Log: * bootstraptest/test_fork.rb: add a test for [ruby-core:28924]. Modified files: trunk/ChangeLog trunk/bootstraptest/test_fork.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 27404) +++ ChangeLog (revision 27405) @@ -1,3 +1,7 @@ +Tue Apr 20 01:03:00 2010 Yusuke Endoh <mame@t...> + + * bootstraptest/test_fork.rb: add a test for [ruby-core:28924]. + Tue Apr 20 00:43:03 2010 Nobuyoshi Nakada <nobu@r...> * file.c (rb_file_s_extname): skip last directory separators. Index: bootstraptest/test_fork.rb =================================================================== --- bootstraptest/test_fork.rb (revision 27404) +++ bootstraptest/test_fork.rb (revision 27405) @@ -26,3 +26,24 @@ 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]' -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/