summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-19 00:56:44 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-19 00:56:44 +0000
commit5afad3ecb89e2a6ecd98f94dcc0d153b5121502f (patch)
tree612160aeff5ef901da0b41ad8a67ecc748407bbd
parent1968f8666f4f56504b2e0d5a8845313797fa0eba (diff)
downloadruby-5afad3ecb89e2a6ecd98f94dcc0d153b5121502f.tar.gz
ruby-5afad3ecb89e2a6ecd98f94dcc0d153b5121502f.tar.xz
ruby-5afad3ecb89e2a6ecd98f94dcc0d153b5121502f.zip
* test_thread.rb: DO NOT USE FORK WITHOUT RESCUE.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--bootstraptest/test_thread.rb13
1 files changed, 8 insertions, 5 deletions
diff --git a/bootstraptest/test_thread.rb b/bootstraptest/test_thread.rb
index e46362616..5fd1d18e9 100644
--- a/bootstraptest/test_thread.rb
+++ b/bootstraptest/test_thread.rb
@@ -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]'