From 267371b1273b518215939e817e53733584b68af7 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 29 Dec 2019 12:51:18 +0000 Subject: spawn: allow passing GLOB handles for redirects We can save callers the trouble of {-hold} and {-dev_null} refs as well as the trouble of calling fileno(). --- lib/PublicInbox/Xapcmd.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/PublicInbox/Xapcmd.pm') diff --git a/lib/PublicInbox/Xapcmd.pm b/lib/PublicInbox/Xapcmd.pm index 9f897dad..544242a3 100644 --- a/lib/PublicInbox/Xapcmd.pm +++ b/lib/PublicInbox/Xapcmd.pm @@ -286,7 +286,7 @@ sub compact ($$) { defined(my $dfd = $opt->{$fd}) or next; $rdr->{$fd} = $dfd; } - $rdr->{1} = fileno($w) if $pr && pipe($r, $w); + $rdr->{1} = $w if $pr && pipe($r, $w); # we rely on --no-renumber to keep docids synched to NNTP my $cmd = [ $XAPIAN_COMPACT, '--no-renumber' ]; -- cgit v1.2.3-24-ge0c7