1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

ext/extmk.rb: reopen stdout

* ext/extmk.rb (extmake): reopen $stdout to NULL, since setting
  $stdout cannot affect child processes.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2012-05-20 14:00:15 +00:00
parent 2dc01a5f2f
commit e95d690380
2 changed files with 12 additions and 4 deletions

View file

@ -1,3 +1,8 @@
Sun May 20 23:00:11 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/extmk.rb (extmake): reopen $stdout to NULL, since setting
$stdout cannot affect child processes.
Sun May 20 21:36:39 2012 NARUSE, Yui <naruse@ruby-lang.org> Sun May 20 21:36:39 2012 NARUSE, Yui <naruse@ruby-lang.org>
* enc/shift_jis.c (code_to_mbclen): return * enc/shift_jis.c (code_to_mbclen): return

View file

@ -187,15 +187,18 @@ def extmake(target)
Logging::logfile 'mkmf.log' Logging::logfile 'mkmf.log'
rm_f makefile rm_f makefile
if conf if conf
stdout = $stdout.dup
stderr = $stderr.dup
unless verbose? unless verbose?
stdout, $stdout = $stdout, File.open(File::NULL, "a") $stderr.reopen($stdout.reopen(File::NULL))
else
stdout = $stdout
end end
begin begin
load $0 = conf load $0 = conf
ensure ensure
$stdout = stdout $stderr.reopen(stderr)
$stdout.reopen(stdout)
stdout.close
stderr.close
end end
else else
create_makefile(target) create_makefile(target)