From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 318F01F513 for ; Wed, 3 Jul 2024 10:52:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1720003923; bh=Th1yTupMlcHMluDSBHCEIr+r6YLUxLJ/mf8cloV7K0Q=; h=From:To:Subject:Date:In-Reply-To:References:From; b=UvliQSLKLx8GI0JedMlifuynNQ8ZeA2x6XrvJwsKOpXYrNg3X01s0c3IvWbrtT/ut Awg1g3w4AOw342saz+mUJ42INfdpSs31IYETv7ODoGR8/zzm89kC1gk3id9VNqYOvj yhnNw7ffPn6jKGGkNUK6UjxEVV15qIieqxszkAao= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 1/2] input_pipe: fstat(2) IO properly Date: Wed, 3 Jul 2024 10:52:01 +0000 Message-ID: <20240703105202.2735313-2-e@80x24.org> In-Reply-To: <20240703105202.2735313-1-e@80x24.org> References: <20240703105202.2735313-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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. --- 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 ee5bda59..77eae4ed 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;