diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-25 00:57:03 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-06-25 00:57:03 +0000 |
commit | 9f16d373f3fcd1113f82f1f2b48c990c78113094 (patch) | |
tree | b9c0e426d0ad498689777b1521ef2e1010d610d2 /test/ruby | |
parent | 13158c4d79aaf6d2d7f71804a5acf4bff0def168 (diff) | |
download | ruby-9f16d373f3fcd1113f82f1f2b48c990c78113094.tar.gz |
* test/ruby/envutil.rb (EnvUtil#invoke_ruby): get rid of possible
deadlock.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/envutil.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ruby/envutil.rb b/test/ruby/envutil.rb index 7e52a8ffd7..5a81daab33 100644 --- a/test/ruby/envutil.rb +++ b/test/ruby/envutil.rb @@ -88,10 +88,10 @@ module EnvUtil in_c.close out_c.close if capture_stdout err_c.close if capture_stderr - in_p.write stdin_data.to_str - in_p.close th_stdout = Thread.new { out_p.read } if capture_stdout th_stderr = Thread.new { err_p.read } if capture_stderr + in_p.write stdin_data.to_str + in_p.close if (!capture_stdout || th_stdout.join(10)) && (!capture_stderr || th_stderr.join(10)) stdout = th_stdout.value if capture_stdout stderr = th_stderr.value if capture_stderr |