summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-12-29 21:21:47 -0800
committerEric Wong <normalperson@yhbt.net>2009-12-29 21:30:32 -0800
commitfe005f50efc8db5b9f4b2387b3b2c42f12d7c2c0 (patch)
tree59a2b3b1d993bee23e0e8eecbedb356d4b75c7cd
parent8268fea415a8c76da810f0a43e0bf63ac6c77238 (diff)
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....
-rw-r--r--lib/unicorn/launcher.rb3
1 files changed, 1 insertions, 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