From: Eric Wong Date: Tue, 17 Oct 2023 21:47:13 +0000 (+0000) Subject: input_pipe: fix socket check X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=042662948d804d2486eee5200276a4134bd18ee2;p=thirdparty%2Fpublic-inbox.git input_pipe: fix socket check `-S' is the correct file test op for sockets, `-s' is for st_size. --- diff --git a/lib/PublicInbox/InputPipe.pm b/lib/PublicInbox/InputPipe.pm index 8358ddd62..b38d8270f 100644 --- a/lib/PublicInbox/InputPipe.pm +++ b/lib/PublicInbox/InputPipe.pm @@ -39,7 +39,7 @@ sub consume { if ($@) { # regular file (but not w/ select|IO::Poll backends) $self->{-need_rq} = 1; $self->requeue; - } elsif (-p $in || -s _) { # O_NONBLOCK for sockets and pipes + } elsif (-p $in || -S _) { # O_NONBLOCK for sockets and pipes $in->blocking(0); } elsif (-t $in) { # isatty(3) can't use `_' stat cache unblock_tty($self);