Kyle Meyer <[email protected]> wrote:
> This seems to break the pager functionality.  For example, if I do
> 
>   lei q -I https://public-inbox.org/meta/ s:blob
> 
> I end up in a misbehaving pager (/bin/less, on my system).  Navigation
> keys like 'j' and 'k' are instead passed through, and enter returns to
> the prompt.

Odd, I'm not getting the exact same behavior, but I noticed
it's not getting reaped.  Does this fix things for you?

-----8<-----
Subject: [PATCH] script/lei: waitpid for git-credential and pager

We need to ensure we reap things we spawn.
---
 script/lei | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

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 {
--
unsubscribe: one-click, see List-Unsubscribe header
archive: https://public-inbox.org/meta/

Reply via email to