]> Sergey Matveev's repositories - public-inbox.git/commitdiff
import: purge: reap fast-export process
authorEric Wong <e@80x24.org>
Fri, 11 Jan 2019 03:50:51 +0000 (03:50 +0000)
committerEric Wong <e@80x24.org>
Fri, 11 Jan 2019 03:55:30 +0000 (03:55 +0000)
Zombies are bad.

lib/PublicInbox/Import.pm

index fd4255cf867d6ca1a40dcce1fe19265f536803e6..7e596abc38b2bc541074f757c560ca33ed64610f 100644 (file)
@@ -495,7 +495,7 @@ sub purge_oids {
        my $old = $self->{'ref'};
        my $git = $self->{git};
        my @export = (qw(fast-export --no-data --use-done-feature), $old);
-       my ($rd, $pid) = $git->popen(@export);
+       my $rd = $git->popen(@export);
        my ($r, $w) = $self->gfi_start;
        my @buf;
        my $npurge = 0;
@@ -550,6 +550,7 @@ sub purge_oids {
                        push @buf, $_;
                }
        }
+       close $rd or die "close fast-export failed: $?";
        if (@buf) {
                $w->print(@buf) or wfail;
        }