1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
mame 2010-04-19 16:03:39 +00:00
parent cb508fe739
commit ab10ac8f12
2 changed files with 25 additions and 0 deletions

View file

@ -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> Tue Apr 20 00:43:03 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* file.c (rb_file_s_extname): skip last directory separators. * file.c (rb_file_s_extname): skip last directory separators.

View file

@ -26,3 +26,24 @@ assert_normal_exit(<<'End', '[ruby-dev:37934]')
Process.setrlimit(:NPROC, 1) Process.setrlimit(:NPROC, 1)
fork {} fork {}
End 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]'