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:
parent
2dc01a5f2f
commit
e95d690380
2 changed files with 12 additions and 4 deletions
|
@ -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>
|
||||
|
||||
* enc/shift_jis.c (code_to_mbclen): return
|
||||
|
|
11
ext/extmk.rb
11
ext/extmk.rb
|
@ -187,15 +187,18 @@ def extmake(target)
|
|||
Logging::logfile 'mkmf.log'
|
||||
rm_f makefile
|
||||
if conf
|
||||
stdout = $stdout.dup
|
||||
stderr = $stderr.dup
|
||||
unless verbose?
|
||||
stdout, $stdout = $stdout, File.open(File::NULL, "a")
|
||||
else
|
||||
stdout = $stdout
|
||||
$stderr.reopen($stdout.reopen(File::NULL))
|
||||
end
|
||||
begin
|
||||
load $0 = conf
|
||||
ensure
|
||||
$stdout = stdout
|
||||
$stderr.reopen(stderr)
|
||||
$stdout.reopen(stdout)
|
||||
stdout.close
|
||||
stderr.close
|
||||
end
|
||||
else
|
||||
create_makefile(target)
|
||||
|
|
Loading…
Reference in a new issue