Skip to content

Commit

Permalink
remain RUBY_ON_BUG for child processes.
Browse files Browse the repository at this point in the history
`RUBY_ON_BUG` is useful for child processes created by the test
process.
  • Loading branch information
ko1 committed Jan 19, 2022
1 parent 308fe1e commit 374904b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tool/lib/envutil.rb
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,12 @@ def invoke_ruby(args, stdin_data = "", capture_stdout = false, capture_stderr =
if RUBYLIB and lib = child_env["RUBYLIB"]
child_env["RUBYLIB"] = [lib, RUBYLIB].join(File::PATH_SEPARATOR)
end
child_env['ASAN_OPTIONS'] = ENV['ASAN_OPTIONS'] if ENV['ASAN_OPTIONS']

# remain env
%w(ASAN_OPTIONS RUBY_ON_BUG).each{|name|
child_env[name] = ENV[name] if ENV[name]
}

args = [args] if args.kind_of?(String)
pid = spawn(child_env, *precommand, rubybin, *args, opt)
in_c.close
Expand Down

0 comments on commit 374904b

Please sign in to comment.