Skip to content

Commit 374904b

Browse files
committed
remain RUBY_ON_BUG for child processes.
`RUBY_ON_BUG` is useful for child processes created by the test process.
1 parent 308fe1e commit 374904b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tool/lib/envutil.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,12 @@ def invoke_ruby(args, stdin_data = "", capture_stdout = false, capture_stderr =
152152
if RUBYLIB and lib = child_env["RUBYLIB"]
153153
child_env["RUBYLIB"] = [lib, RUBYLIB].join(File::PATH_SEPARATOR)
154154
end
155-
child_env['ASAN_OPTIONS'] = ENV['ASAN_OPTIONS'] if ENV['ASAN_OPTIONS']
155+
156+
# remain env
157+
%w(ASAN_OPTIONS RUBY_ON_BUG).each{|name|
158+
child_env[name] = ENV[name] if ENV[name]
159+
}
160+
156161
args = [args] if args.kind_of?(String)
157162
pid = spawn(child_env, *precommand, rubybin, *args, opt)
158163
in_c.close

0 commit comments

Comments
 (0)