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 | c66852b812817b847b7369661598c00884faae42 (patch) | |
tree | 66f839884e56b4654cf7fb7ddf5529e5ae73c7b1 /spec/rubyspec/core | |
parent | 0dc32472d75b54c8b70f55311c88502b07e591b5 (diff) | |
download | ruby-c66852b812817b847b7369661598c00884faae42.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
Diffstat (limited to 'spec/rubyspec/core')
-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" |