diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-11 01:02:47 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-11 01:02:47 +0000 |
commit | a3656d4222509f0befa6d01f0ccd3f7a9442665b (patch) | |
tree | 167f2314265dfd7669ce11bb0543876194b57133 /test | |
parent | c6e9e4110e7878cdd13c4b92f79101a2b2e03c97 (diff) | |
download | ruby-a3656d4222509f0befa6d01f0ccd3f7a9442665b.tar.gz |
signal.c: directly deliver non-handlable signals
* signal.c (rb_f_kill): directly deliver signals which cannot be
handled, i.e., SIGKILL and SIGSTOP.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_process.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb index 94fda02ebb..5abc5bca0b 100644 --- a/test/ruby/test_process.rb +++ b/test/ruby/test_process.rb @@ -1201,6 +1201,21 @@ class TestProcess < Test::Unit::TestCase def test_status_kill return unless Process.respond_to?(:kill) + return unless Signal.list.include?("KILL") + + with_tmpchdir do + write_file("foo", "Process.kill(:KILL, $$); exit(42)") + system(RUBY, "foo") + s = $? + assert_equal([false, true, false, nil], + [s.exited?, s.signaled?, s.stopped?, s.success?], + "[s.exited?, s.signaled?, s.stopped?, s.success?]") + assert_equal(false, s.exited?) + end + end + + def test_status_quit + return unless Process.respond_to?(:kill) return unless Signal.list.include?("QUIT") with_tmpchdir do |