From fe005f50efc8db5b9f4b2387b3b2c42f12d7c2c0 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 29 Dec 2009 21:21:47 -0800 Subject: launcher: no point in sync-ing $stdin Inspection of the MRI source reveals that IO#sync=true only appears to only apply for writes. Though it could eventually make sense to disable read buffering by setting IO#sync=true, it does not appear to happen. Of course we never read from $stdin anyways.... --- lib/unicorn/launcher.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/unicorn/launcher.rb b/lib/unicorn/launcher.rb index ccf9d8c..e71f93b 100644 --- a/lib/unicorn/launcher.rb +++ b/lib/unicorn/launcher.rb @@ -1,6 +1,6 @@ # -*- encoding: binary -*- -$stdin.sync = $stdout.sync = $stderr.sync = true +$stdout.sync = $stderr.sync = true $stdin.binmode $stdout.binmode $stderr.binmode @@ -21,7 +21,6 @@ class Unicorn::Launcher # is a symlink or otherwise got replaced. def self.daemonize!(options = nil) $stdin.reopen("/dev/null") - $stdin.sync = true # may not do anything... # We only start a new process group if we're not being reexecuted # and inheriting file descriptors from our parent -- cgit v1.2.3-24-ge0c7