about summary refs log tree commit homepage
path: root/lib/unicorn/select_waiter.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/unicorn/select_waiter.rb')
-rw-r--r--lib/unicorn/select_waiter.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/unicorn/select_waiter.rb b/lib/unicorn/select_waiter.rb
new file mode 100644
index 0000000..cb84aab
--- /dev/null
+++ b/lib/unicorn/select_waiter.rb
@@ -0,0 +1,6 @@
+# fallback for non-Linux and Linux <4.5 systems w/o EPOLLEXCLUSIVE
+class Unicorn::SelectWaiter # :nodoc:
+  def get_readers(ready, readers, timeout) # :nodoc:
+    ret = IO.select(readers, nil, nil, timeout) and ready.replace(ret[0])
+  end
+end