envutil.rb: signal argument
* test/lib/envutil.rb (invoke_ruby): add optional keyword argument of signal to be sent to hung-up process. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ee4cb17b98
commit
e961fcd528
@ -33,6 +33,7 @@ module EnvUtil
|
|||||||
def invoke_ruby(args, stdin_data = "", capture_stdout = false, capture_stderr = false,
|
def invoke_ruby(args, stdin_data = "", capture_stdout = false, capture_stderr = false,
|
||||||
encoding: nil, timeout: 10, reprieve: 1,
|
encoding: nil, timeout: 10, reprieve: 1,
|
||||||
stdout_filter: nil, stderr_filter: nil,
|
stdout_filter: nil, stderr_filter: nil,
|
||||||
|
signal: (/mswin|mingw/ =~ RUBY_PLATFORM ? :KILL : :TERM),
|
||||||
rubybin: EnvUtil.rubybin,
|
rubybin: EnvUtil.rubybin,
|
||||||
**opt)
|
**opt)
|
||||||
in_c, in_p = IO.pipe
|
in_c, in_p = IO.pipe
|
||||||
@ -67,7 +68,6 @@ module EnvUtil
|
|||||||
stdout = th_stdout.value if capture_stdout
|
stdout = th_stdout.value if capture_stdout
|
||||||
stderr = th_stderr.value if capture_stderr && capture_stderr != :merge_to_stdout
|
stderr = th_stderr.value if capture_stderr && capture_stderr != :merge_to_stdout
|
||||||
else
|
else
|
||||||
signal = /mswin|mingw/ =~ RUBY_PLATFORM ? :KILL : :TERM
|
|
||||||
case pgroup = opt[:pgroup]
|
case pgroup = opt[:pgroup]
|
||||||
when 0, true
|
when 0, true
|
||||||
pgroup = -pid
|
pgroup = -pid
|
||||||
|
Loading…
x
Reference in New Issue
Block a user