From: Eric Wong Date: Mon, 5 Apr 2021 08:36:57 +0000 (+0000) Subject: script/lei: waitpid for git-credential and pager X-Git-Tag: v1.7.0~819 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=64e5b12bca9148e74c4dca5f090decc21e12b879;hp=78b7e158b5a8391db2fc3420fa9f99d2be7648d2;p=public-inbox.git script/lei: waitpid for git-credential and pager We need to ensure we reap things we spawn. --- diff --git a/script/lei b/script/lei index 78a7dab9..76217ab9 100755 --- a/script/lei +++ b/script/lei @@ -52,7 +52,11 @@ my $exec_cmd = sub { @parent = ($parent); return; # continue $recv_cmd in background } - $do_exec->() if !scalar(@$fds); # MUA reuses all FDs + if (scalar(@$fds)) { + $pids{$pid} = undef; + } else { + $do_exec->(); # MUA reuses all FDs + } }; if ($send_cmd && eval {