mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test_thread.rb: DO NOT USE FORK WITHOUT RESCUE.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2038c0f360
commit
1968717136
1 changed files with 8 additions and 5 deletions
|
@ -420,10 +420,13 @@ assert_finish 3, %q{
|
|||
end
|
||||
end
|
||||
|
||||
pid = fork do
|
||||
# Child
|
||||
STDOUT.write "This is the child process.\n"
|
||||
STDOUT.write "Child process exiting.\n"
|
||||
begin
|
||||
pid = fork do
|
||||
# Child
|
||||
STDOUT.write "This is the child process.\n"
|
||||
STDOUT.write "Child process exiting.\n"
|
||||
end
|
||||
Process.waitpid(pid)
|
||||
rescue NotImplementedError
|
||||
end
|
||||
Process.waitpid(pid)
|
||||
}, '[ruby-core:26361]'
|
||||
|
|
Loading…
Add table
Reference in a new issue