diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-22 05:59:11 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-22 05:59:11 +0000 |
commit | 0d92f156b6e7533de63724a85e15651616f35c2f (patch) | |
tree | 2c5416f383b2504fb15233b73d832f577a61da7d /lib | |
parent | 14d44c8997c5e1b0d81f6e7ace2c7a5e5ba1e84b (diff) | |
download | ruby-0d92f156b6e7533de63724a85e15651616f35c2f.tar.gz |
webrick/httpservelet/cgi_runner: avoid IO#reopen on pathname
IO#reopen seems to behave strangely on Win32 based on the logs
posted by Greg for [Bug #14420]. Lets try to fix the issue by
using File.open explicitly (but not Kernel#open).
* lib/webrick/httpservelet/cgi_runner: use File.open explicitly
[Bug #14220]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/webrick/httpservlet/cgi_runner.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/webrick/httpservlet/cgi_runner.rb b/lib/webrick/httpservlet/cgi_runner.rb index 3ebbcebb26..0398c16749 100644 --- a/lib/webrick/httpservlet/cgi_runner.rb +++ b/lib/webrick/httpservlet/cgi_runner.rb @@ -23,11 +23,11 @@ STDIN.binmode len = sysread(STDIN, 8).to_i out = sysread(STDIN, len) -STDOUT.reopen(out, "w") +STDOUT.reopen(File.open(out, "w")) len = sysread(STDIN, 8).to_i err = sysread(STDIN, len) -STDERR.reopen(err, "w") +STDERR.reopen(File.open(err, "w")) len = sysread(STDIN, 8).to_i dump = sysread(STDIN, len) |