diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-09-15 13:42:15 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-09-15 13:42:15 +0000 |
commit | 071c45df939e962e8cd6ecc51bd402b6a7cc91f6 (patch) | |
tree | 536d4765db6eb44bbc0c861fae909bfea44726fe /test/ruby | |
parent | 80fb5e0584644131bdd10372a932a563373717d5 (diff) | |
download | ruby-071c45df939e962e8cd6ecc51bd402b6a7cc91f6.tar.gz |
* test/ruby/test_signal.rb (test_exit_action): skip the test using
fork on fork-less platforms.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_signal.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_signal.rb b/test/ruby/test_signal.rb index 6ff33a29aa..8daa1cfa21 100644 --- a/test/ruby/test_signal.rb +++ b/test/ruby/test_signal.rb @@ -2,6 +2,15 @@ require 'test/unit' require 'timeout' class TestSignal < Test::Unit::TestCase + def have_fork? + begin + fork{} + true + rescue NotImplementedError + false + end + end + def test_signal defined?(Process.kill) or return begin @@ -25,6 +34,7 @@ class TestSignal < Test::Unit::TestCase end def test_exit_action + return unless have_fork? # snip this test begin r, w = IO.pipe r0, w0 = IO.pipe |