aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_signal.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_signal.rb')
-rw-r--r--test/ruby/test_signal.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ruby/test_signal.rb b/test/ruby/test_signal.rb
index 0098ccc539..2b2d88b06f 100644
--- a/test/ruby/test_signal.rb
+++ b/test/ruby/test_signal.rb
@@ -36,6 +36,18 @@ class TestSignal < Test::Unit::TestCase
end
end
+ def test_signal_process_group
+ return unless Process.respond_to?(:kill)
+ bug4362 = '[ruby-dev:43169]'
+ assert_nothing_raised(bug4362) do
+ pid = Process.spawn(EnvUtil.rubybin, '-e', '"sleep 10"', :pgroup => true)
+ Process.kill(:"-TERM", pid)
+ Process.waitpid(pid)
+ assert_equal(true, $?.signaled?)
+ assert_equal(Signal.list["TERM"], $?.termsig)
+ end
+ end
+
def test_exit_action
return unless have_fork? # skip this test
begin