summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-15 13:37:47 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-15 13:37:47 +0000
commit29c2876d610275a42642ecb67ddc28906e484968 (patch)
tree8e23622a2735a6e446ea8c6b68847cb963b04896 /test/ruby
parent980155686aa373e015f51e3e279403d2aa66d4b9 (diff)
* signal.c (rb_f_kill): accept '-SIGXXX' style signal with Symbol or
implicit convertion with #to_str. [ruby-dev:43169] fixes #4362 * test/ruby/test_signal.rb (test_signal_process_group): add a test for send signal to process group. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-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