about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-01-05 21:25:42 +0000
committerEric Wong <e@80x24.org>2019-01-05 21:25:42 +0000
commit775d12f58a6922576c9264f3637daa992babb532 (patch)
tree98761fde86bcabf66d44085c1ec4d4e8b0bcd25d
parent38cdd06ca624f5b1b6f874724c88976cf8398367 (diff)
downloadyahns-775d12f58a6922576c9264f3637daa992babb532.tar.gz
Old kernels running on alpha may EINVAL, here; but
modern kernels will automatically increase the passed
value to the minimum size supported by the kernel.
This only affects alpha, since all other arches use 4K
page size on Linux.
-rw-r--r--lib/yahns/worker.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/yahns/worker.rb b/lib/yahns/worker.rb
index 1b65e3d..0355629 100644
--- a/lib/yahns/worker.rb
+++ b/lib/yahns/worker.rb
@@ -10,13 +10,13 @@ class Yahns::Worker # :nodoc:
     @nr = nr
     @to_io, @wr = Kgio::Pipe.new
 
-    # Seems it's only alpha with a != 4K page size on Linux
     begin
       # F_SETPIPE_SZ = 1031, PAGE_SIZE = 4096
+      # (fcntl will handle minimum size on platforms where PAGE_SIZE > 4096)
       @to_io.fcntl(1031, 4096)
     rescue Errno::EINVAL
       # old kernel
-    end if RUBY_PLATFORM =~ /\blinux\b/ && RUBY_PLATFORM !~ /alpha/
+    end if RUBY_PLATFORM =~ /\blinux\b/
   end
 
   def atfork_child