diff options
author | Eric Wong <e@80x24.org> | 2021-01-10 12:15:09 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-01-12 03:51:42 +0000 |
commit | c58c970e52e3315e407df5bf46092f613502caa6 (patch) | |
tree | fcfe52b9c85ccd566d1c7b8008227a9f0dd6d86c | |
parent | c1339190c4d682db1cb23331ff0c247f42e3904f (diff) | |
download | public-inbox-c58c970e52e3315e407df5bf46092f613502caa6.tar.gz |
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..
-rw-r--r-- | lib/PublicInbox/LEI.pm | 6 |
1 files 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 |