diff options
author | Eric Wong <e@80x24.org> | 2023-09-26 07:44:40 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2023-09-26 21:02:48 +0000 |
commit | 72ccceeb02542dda09b8a641c2bd17dd74440cc2 (patch) | |
tree | 86e365e53e986624a7d623e164c3e60f46a53470 /lib/PublicInbox/LeiRediff.pm | |
parent | 344897c0b27e061e41f2660f3c7a3de9a7b78452 (diff) | |
download | public-inbox-72ccceeb02542dda09b8a641c2bd17dd74440cc2.tar.gz |
It's basically the `system' perlop with support for env overrides, redirects, chdir, rlimits, and setpgid support.
Diffstat (limited to 'lib/PublicInbox/LeiRediff.pm')
-rw-r--r-- | lib/PublicInbox/LeiRediff.pm | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/PublicInbox/LeiRediff.pm b/lib/PublicInbox/LeiRediff.pm index 9cf95c08..824289d6 100644 --- a/lib/PublicInbox/LeiRediff.pm +++ b/lib/PublicInbox/LeiRediff.pm @@ -7,7 +7,7 @@ use strict; use v5.10.1; use parent qw(PublicInbox::IPC PublicInbox::LeiInput); use File::Temp 0.19 (); # 0.19 for ->newdir -use PublicInbox::Spawn qw(spawn which); +use PublicInbox::Spawn qw(run_wait spawn which); use PublicInbox::MsgIter qw(msg_part_text); use PublicInbox::ViewDiff; use PublicInbox::LeiBlob; @@ -136,9 +136,8 @@ EOM $lei->qerr("# git @$cmd"); push @$cmd, qw(A B); unshift @$cmd, 'git', "--git-dir=$rw->{git_dir}"; - $pid = spawn($cmd, $lei->{env}, { 2 => $lei->{2}, 1 => $lei->{1} }); - waitpid($pid, 0); - $lei->child_error($?) if $?; # for git diff --exit-code + run_wait($cmd, $lei->{env}, { 2 => $lei->{2}, 1 => $lei->{1} }) and + $lei->child_error($?); # for git diff --exit-code undef; } |