mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Use environment values to find ruby and flags instead of an argument
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d655f8c592
commit
d81b7cd54c
2 changed files with 1 additions and 3 deletions
|
@ -46,7 +46,6 @@ module ProcessSpecs
|
|||
Thread.current.abort_on_exception = true
|
||||
args = [@pid_file]
|
||||
args << scenario if scenario
|
||||
args << RUBY_EXE.inspect if scenario
|
||||
@result = ruby_exe @script, args: args
|
||||
end
|
||||
Thread.pass while @thread.status and !File.exist?(@pid_file)
|
||||
|
|
|
@ -2,7 +2,6 @@ require 'thread'
|
|||
|
||||
pid_file = ARGV.shift
|
||||
scenario = ARGV.shift
|
||||
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
|
||||
|
@ -40,7 +39,7 @@ if scenario
|
|||
end
|
||||
|
||||
code = "Process.kill(#{signal}, #{process})"
|
||||
system(*ruby_exe.split(' '), "-e", code)
|
||||
system(ENV["RUBY_EXE"], *ENV["RUBY_FLAGS"].split(' '), "-e", code)
|
||||
end
|
||||
|
||||
sleep 0.001 until mutex.locked? and $signaled
|
||||
|
|
Loading…
Add table
Reference in a new issue