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/Fetch.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/Fetch.pm')
-rw-r--r-- | lib/PublicInbox/Fetch.pm | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/PublicInbox/Fetch.pm b/lib/PublicInbox/Fetch.pm index 8f3a87e2..6e9b1e94 100644 --- a/lib/PublicInbox/Fetch.pm +++ b/lib/PublicInbox/Fetch.pm @@ -5,7 +5,7 @@ package PublicInbox::Fetch; use v5.12; use parent qw(PublicInbox::IPC); use URI (); -use PublicInbox::Spawn qw(popen_rd run_die spawn); +use PublicInbox::Spawn qw(popen_rd run_wait); use PublicInbox::Admin; use PublicInbox::LEI; use PublicInbox::LeiCurl; @@ -133,9 +133,8 @@ sub do_fetch { # main entry point warn "W: $edir missing remote.*.url\n"; my $o = { -C => $edir }; $o->{1} = $o->{2} = $lei->{2}; - my $pid = spawn([qw(git config -l)], undef, $o); - waitpid($pid, 0); - $lei->child_error($?) if $?; + run_wait([qw(git config -l)], undef, $o) and + $lei->child_error($?); } } @epochs = grep { !$skip->{$_} } @epochs if $skip; |