mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Write stdin_data only if it exists
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ba49a1e025
commit
809013566e
1 changed files with 1 additions and 1 deletions
|
@ -62,7 +62,7 @@ module EnvUtil
|
|||
else
|
||||
th_stdout = Thread.new { out_p.read } if capture_stdout
|
||||
th_stderr = Thread.new { err_p.read } if capture_stderr && capture_stderr != :merge_to_stdout
|
||||
in_p.write stdin_data.to_str
|
||||
in_p.write stdin_data.to_str unless stdin_data.empty?
|
||||
in_p.close
|
||||
if (!th_stdout || th_stdout.join(timeout)) && (!th_stderr || th_stderr.join(timeout))
|
||||
stdout = th_stdout.value if capture_stdout
|
||||
|
|
Loading…
Add table
Reference in a new issue