From c4b2dccd7db4126cab49fd4b2ec1545be5ba5ba6 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 31 Jan 2021 22:28:29 -1000 Subject: import: reap git-config(1) synchronously This avoids a zombie if another step of the event loop takes too long. --- lib/PublicInbox/Import.pm | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/PublicInbox/Import.pm') diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm index 8a06a661..a070aa1e 100644 --- a/lib/PublicInbox/Import.pm +++ b/lib/PublicInbox/Import.pm @@ -24,6 +24,7 @@ sub default_branch () { delete local $ENV{GIT_CONFIG}; my $r = popen_rd([qw(git config --global init.defaultBranch)]); chomp(my $h = <$r> // ''); + close $r; $h eq '' ? 'refs/heads/master' : $h; } } -- cgit v1.2.3-24-ge0c7