From 02fdcf93c3b55918f92fd34cf57688a2485aeb13 Mon Sep 17 00:00:00 2001 From: usa Date: Thu, 15 Sep 2005 13:42:15 +0000 Subject: * test/ruby/test_signal.rb (test_exit_action): skip the test using fork on fork-less platforms. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_signal.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_signal.rb b/test/ruby/test_signal.rb index 6ff33a29a..8daa1cfa2 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 -- cgit