diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-05-10 14:18:10 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-05-10 14:18:10 +0000 |
commit | 6255d97139ce95d3c99e405d71cc49c0f0206617 (patch) | |
tree | 66f839884e56b4654cf7fb7ddf5529e5ae73c7b1 | |
parent | 3fc680bf35077a474eb086a9af98b725f79817c9 (diff) | |
download | ruby-6255d97139ce95d3c99e405d71cc49c0f0206617.tar.gz |
Process.getpgrp and Process.setsid must be available for Process#kill group specs
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | spec/rubyspec/core/process/fixtures/kill.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/rubyspec/core/process/fixtures/kill.rb b/spec/rubyspec/core/process/fixtures/kill.rb index 9f2d4f33a0..abc8a2db2d 100644 --- a/spec/rubyspec/core/process/fixtures/kill.rb +++ b/spec/rubyspec/core/process/fixtures/kill.rb @@ -7,7 +7,7 @@ ruby_exe = ARGV.shift # We must do this first otherwise there will be a race with the process that # creates this process and the TERM signal below could go to that process # instead, which will likely abort the specs process. -Process.setsid if scenario && Process.respond_to?(:setsid) +Process.setsid if scenario signaled = false mutex = Mutex.new @@ -25,8 +25,8 @@ end File.open(pid_file, "wb") { |f| f.puts Process.pid } if scenario - # We are sending a signal to ourselves or the process group - process = Process.respond_to?(:getpgid) ? "Process.getpgid(Process.pid)" : "Process.pid" + # We are sending a signal to the process group + process = "Process.getpgrp" case scenario when "self" |