From: Eric Wong Date: Mon, 1 Feb 2021 08:28:29 +0000 (-1000) Subject: import: reap git-config(1) synchronously X-Git-Tag: v1.7.0~1252 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=c4b2dccd7db4126cab49fd4b2ec1545be5ba5ba6;p=public-inbox.git import: reap git-config(1) synchronously This avoids a zombie if another step of the event loop takes too long. --- 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; } }