[前][次][番号順一覧][スレッド一覧]

ruby-changes:46529

From: eregon <ko1@a...>
Date: Wed, 10 May 2017 23:18:15 +0900 (JST)
Subject: [ruby-changes:46529] eregon:r58650 (trunk): Process.getpgrp and Process.setsid must be available for Process#kill group specs

eregon	2017-05-10 23:18:10 +0900 (Wed, 10 May 2017)

  New Revision: 58650

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58650

  Log:
    Process.getpgrp and Process.setsid must be available for Process#kill group specs

  Modified files:
    trunk/spec/rubyspec/core/process/fixtures/kill.rb
Index: spec/rubyspec/core/process/fixtures/kill.rb
===================================================================
--- spec/rubyspec/core/process/fixtures/kill.rb	(revision 58649)
+++ spec/rubyspec/core/process/fixtures/kill.rb	(revision 58650)
@@ -7,7 +7,7 @@ ruby_exe = ARGV.shift https://github.com/ruby/ruby/blob/trunk/spec/rubyspec/core/process/fixtures/kill.rb#L7
 # 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 https://github.com/ruby/ruby/blob/trunk/spec/rubyspec/core/process/fixtures/kill.rb#L25
 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"

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]