mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
13158c4d79
commit
9f16d373f3
2 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
Fri Jun 25 09:56:39 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* test/ruby/envutil.rb (EnvUtil#invoke_ruby): get rid of possible
|
||||
deadlock.
|
||||
|
||||
Fri Jun 25 06:24:25 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/un.rb (httpd): MaxClients also should be integer.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue