]> Sergey Matveev's repositories - public-inbox.git/commitdiff
git: cat-file --batch are their own pgrp
authorEric Wong <e@80x24.org>
Thu, 14 Oct 2021 13:16:06 +0000 (13:16 +0000)
committerEric Wong <e@80x24.org>
Fri, 15 Oct 2021 02:23:25 +0000 (02:23 +0000)
We want these long-lived processes to die naturally when their
parent dies.  Hopefully this improves graceful shutdown for
-extindex because I'm interrupting a lot of reindexing...

lib/PublicInbox/Git.pm

index 37342d7d10a473c77498596a2c7a8c8aa3f573e0..e634ca55fd1f75879d6f8dc15126c7444e21cb80 100644 (file)
@@ -114,7 +114,7 @@ sub _bidi_pipe {
                return;
        }
        pipe(my ($out_r, $out_w)) or $self->fail("pipe failed: $!");
-       my $rdr = { 0 => $out_r };
+       my $rdr = { 0 => $out_r, pgid => 0 };
        my $gd = $self->{git_dir};
        if ($gd =~ s!/([^/]+/[^/]+)\z!/!) {
                $rdr->{-C} = $gd;