]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Xapcmd.pm
spawn: allow passing GLOB handles for redirects
[public-inbox.git] / lib / PublicInbox / Xapcmd.pm
index 9f897dad05f31d098c68183891aace44d1bc2deb..544242a36663594d489aa4a54bfa13e77e30cdd6 100644 (file)
@@ -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' ];