From: Eric Wong Date: Wed, 3 Jul 2024 10:52:01 +0000 (+0000) Subject: input_pipe: fstat(2) IO properly X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2306808d04db434c77731253e923c2b1e63a1b80;p=thirdparty%2Fpublic-inbox.git input_pipe: fstat(2) IO properly We can't rely on `_' being set for all callers. I'm not sure if this was a problem before, but only noticed via manual code inspection. --- diff --git a/lib/PublicInbox/InputPipe.pm b/lib/PublicInbox/InputPipe.pm index ee5bda597..77eae4edb 100644 --- a/lib/PublicInbox/InputPipe.pm +++ b/lib/PublicInbox/InputPipe.pm @@ -14,7 +14,7 @@ sub consume { if ($@) { # regular file (but not w/ select|IO::Poll backends) $self->{-need_rq} = 1; $self->requeue; - } elsif (-p _ || -S _) { # O_NONBLOCK for sockets and pipes + } elsif (-p $in || -S _) { # O_NONBLOCK for sockets and pipes $in->blocking(0); } $self;