ruby-changes:70985
From: Koichi <ko1@a...>
Date: Wed, 19 Jan 2022 23:17:30 +0900 (JST)
Subject: [ruby-changes:70985] 374904b25f (master): remain `RUBY_ON_BUG` for child processes.
https://git.ruby-lang.org/ruby.git/commit/?id=374904b25f From 374904b25f0cd399b800d9b822659fbff382b23c Mon Sep 17 00:00:00 2001 From: Koichi Sasada <ko1@a...> Date: Wed, 19 Jan 2022 17:44:53 +0900 Subject: remain `RUBY_ON_BUG` for child processes. `RUBY_ON_BUG` is useful for child processes created by the test process. --- tool/lib/envutil.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tool/lib/envutil.rb b/tool/lib/envutil.rb index 0391b90c1cc..e21305c9ef7 100644 --- a/tool/lib/envutil.rb +++ b/tool/lib/envutil.rb @@ -152,7 +152,12 @@ module EnvUtil https://github.com/ruby/ruby/blob/trunk/tool/lib/envutil.rb#L152 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 -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/