From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 6E83E1FF9C for ; Sun, 10 Jan 2021 12:15:20 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 12/22] lei: rename $w to $wpager for warning message Date: Sun, 10 Jan 2021 12:15:09 +0000 Message-Id: <20210110121519.17044-13-e@80x24.org> In-Reply-To: <20210110121519.17044-1-e@80x24.org> References: <20210110121519.17044-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Perl keeps track of the variable name for error messages when auto-closing an FD fails, so this will help identify the source of a close error.. --- lib/PublicInbox/LEI.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm index 1f4ed0f6..24f5930b 100644 --- a/lib/PublicInbox/LEI.pm +++ b/lib/PublicInbox/LEI.pm @@ -603,10 +603,10 @@ sub start_pager { $env->{LV} //= '-c'; $env->{COLUMNS} //= 80; # TODO TIOCGWINSZ $env->{MORE} //= 'FRX' if $^O eq 'freebsd'; - pipe(my ($r, $w)) or return warn "pipe: $!"; + pipe(my ($r, $wpager)) or return warn "pipe: $!"; my $rdr = { 0 => $r, 1 => $self->{1}, 2 => $self->{2} }; - $self->{1} = $w; - $self->{2} = $w if -t $self->{2}; + $self->{1} = $wpager; + $self->{2} = $wpager if -t $self->{2}; my $pid = spawn([$pager], $env, $rdr); dwaitpid($pid, undef, $self->{sock}); $env->{GIT_PAGER_IN_USE} = 'true'; # we may spawn git