ruby-changes:36693
From: nobu <ko1@a...>
Date: Thu, 11 Dec 2014 22:54:10 +0900 (JST)
Subject: [ruby-changes:36693] nobu:r48774 (trunk): envutil.rb: kill pgroup
nobu 2014-12-11 22:54:02 +0900 (Thu, 11 Dec 2014) New Revision: 48774 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48774 Log: envutil.rb: kill pgroup * test/lib/envutil.rb (invoke_ruby): kill whole group when :pgroup option is set. Modified files: trunk/test/lib/envutil.rb Index: test/lib/envutil.rb =================================================================== --- test/lib/envutil.rb (revision 48773) +++ test/lib/envutil.rb (revision 48774) @@ -68,8 +68,14 @@ module EnvUtil https://github.com/ruby/ruby/blob/trunk/test/lib/envutil.rb#L68 stderr = th_stderr.value if capture_stderr && capture_stderr != :merge_to_stdout else signal = /mswin|mingw/ =~ RUBY_PLATFORM ? :KILL : :TERM + case pgroup = opt[:pgroup] + when 0, true + pgroup = -pid + when nil, false + pgroup = pid + end begin - Process.kill signal, pid + Process.kill signal, pgroup Timeout.timeout((reprieve unless signal == :KILL)) do Process.wait(pid) end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/