summaryrefslogtreecommitdiff
path: root/lib/webrick/server.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/webrick/server.rb')
-rw-r--r--lib/webrick/server.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/webrick/server.rb b/lib/webrick/server.rb
index 48d9fcd4ec0..47ba4c700f6 100644
--- a/lib/webrick/server.rb
+++ b/lib/webrick/server.rb
@@ -31,9 +31,9 @@ module WEBrick
exit!(0) if fork
Dir::chdir("/")
File::umask(0)
- [ STDIN, STDOUT, STDERR ].each{|io|
- io.reopen("/dev/null", "r+")
- }
+ STDIN.reopen("/dev/null")
+ STDOUT.reopen("/dev/null", "w")
+ STDERR.reopen("/dev/null", "w")
yield if block_given?
end
end