From 042662948d804d2486eee5200276a4134bd18ee2 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 17 Oct 2023 21:47:13 +0000 Subject: [PATCH] input_pipe: fix socket check `-S' is the correct file test op for sockets, `-s' is for st_size. --- lib/PublicInbox/InputPipe.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.47.2