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
@ -62,7 +62,7 @@ module EnvUtil
|
|||||||
else
|
else
|
||||||
th_stdout = Thread.new { out_p.read } if capture_stdout
|
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
|
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
|
in_p.close
|
||||||
if (!th_stdout || th_stdout.join(timeout)) && (!th_stderr || th_stderr.join(timeout))
|
if (!th_stdout || th_stdout.join(timeout)) && (!th_stderr || th_stderr.join(timeout))
|
||||||
stdout = th_stdout.value if capture_stdout
|
stdout = th_stdout.value if capture_stdout
|
||||||
|
Loading…
x
Reference in New Issue
Block a user