mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
envutil.rb: not try to close pipes twice
This commit is contained in:
parent
fedc8075fe
commit
e231f8e8a8
Notes:
git
2020-04-17 00:53:07 +09:00
1 changed files with 4 additions and 2 deletions
|
@ -137,8 +137,10 @@ module EnvUtil
|
|||
args = [args] if args.kind_of?(String)
|
||||
pid = spawn(child_env, *precommand, rubybin, *args, **opt)
|
||||
in_c.close
|
||||
out_c.close if capture_stdout
|
||||
err_c.close if capture_stderr && capture_stderr != :merge_to_stdout
|
||||
out_c&.close
|
||||
out_c = nil
|
||||
err_c&.close
|
||||
err_c = nil
|
||||
if block_given?
|
||||
return yield in_p, out_p, err_p, pid
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue