about summary refs log tree commit homepage
path: root/script
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-04-05 08:36:57 +0000
committerEric Wong <e@80x24.org>2021-04-05 19:12:26 +0000
commit64e5b12bca9148e74c4dca5f090decc21e12b879 (patch)
treefc0376c4134b923741aab2edcc40b61ee25e6232 /script
parent78b7e158b5a8391db2fc3420fa9f99d2be7648d2 (diff)
downloadpublic-inbox-64e5b12bca9148e74c4dca5f090decc21e12b879.tar.gz
We need to ensure we reap things we spawn.
Diffstat (limited to 'script')
-rwxr-xr-xscript/lei6
1 files changed, 5 insertions, 1 deletions
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 {