No point in unsetting the O_NONBLOCK flag
commitc88dafaa616ddd0741f929f5c5988e0c8769b15f
authorEric Wong <normalperson@yhbt.net>
Sun, 3 May 2009 22:19:00 +0000 (3 15:19 -0700)
committerEric Wong <normalperson@yhbt.net>
Sun, 3 May 2009 22:19:00 +0000 (3 15:19 -0700)
tree18a0d3657ab09612148508fb4f109c2f666368d5
parenta5c51c33862580674c997be91dc705c2cf000a36
No point in unsetting the O_NONBLOCK flag

Since we've switched to readpartial, we'll already be protected
from any unpleasant errors that might get thrown at us.  There's
no easy way to prevent MRI from calling a select() internally to
check for readiness, so speculative+blocking read() calls are
out already.

Additionally, most requests come in the form of GETs which are
fully-buffered in the kernel before we even accept() the socket;
so a single readpartial call will be enough to fully consume it.
lib/unicorn.rb