about summary refs log tree commit homepage
path: root/lib/PublicInbox/CidxLogP.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-10-17 23:38:02 +0000
committerEric Wong <e@80x24.org>2023-10-18 20:50:32 +0000
commit48aca3659c248c936a978a8338cf19aacc9483a1 (patch)
treef58abcee6960e6f479f79f5d03f57469d479d0ac /lib/PublicInbox/CidxLogP.pm
parent5406e15b4de72644e4bedb73029c94cad7af5d0a (diff)
downloadpublic-inbox-48aca3659c248c936a978a8338cf19aacc9483a1.tar.gz
We use this in various places to minimize or maximize pipe
size on Linux.  So keep it all in one place.
Diffstat (limited to 'lib/PublicInbox/CidxLogP.pm')
-rw-r--r--lib/PublicInbox/CidxLogP.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/CidxLogP.pm b/lib/PublicInbox/CidxLogP.pm
index 7877d5ac..34f7201d 100644
--- a/lib/PublicInbox/CidxLogP.pm
+++ b/lib/PublicInbox/CidxLogP.pm
@@ -10,12 +10,12 @@
 package PublicInbox::CidxLogP;
 use v5.12;
 use parent qw(PublicInbox::DS);
-use PublicInbox::Syscall qw(EPOLLIN EPOLLONESHOT);
+use PublicInbox::Syscall qw(EPOLLIN EPOLLONESHOT $F_SETPIPE_SZ);
 
 sub new {
         my ($cls, $rd, $cidx, $git, $roots) = @_;
         my $self = bless { cidx => $cidx, git => $git, roots => $roots }, $cls;
-        fcntl($rd, 1031, 1048576) if $^O eq 'linux'; # fatter pipes
+        fcntl($rd, $F_SETPIPE_SZ, 1048576) if $F_SETPIPE_SZ;
         $self->SUPER::new($rd, EPOLLIN|EPOLLONESHOT);
 }