]> Sergey Matveev's repositories - public-inbox.git/commitdiff
lei: rename $w to $wpager for warning message
authorEric Wong <e@80x24.org>
Sun, 10 Jan 2021 12:15:09 +0000 (12:15 +0000)
committerEric Wong <e@80x24.org>
Tue, 12 Jan 2021 03:51:42 +0000 (03:51 +0000)
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

index 1f4ed0f68749c485d2efe205e42a8940557a87f6..24f5930bdab58297d0e87263d68e2ca7a7d3f0ff 100644 (file)
@@ -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