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/LEI.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/LEI.pm')
-rw-r--r-- | lib/PublicInbox/LEI.pm | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm index 432ae61e..2f8d7a96 100644 --- a/lib/PublicInbox/LEI.pm +++ b/lib/PublicInbox/LEI.pm @@ -18,7 +18,7 @@ use IO::Handle (); use Fcntl qw(SEEK_SET); use PublicInbox::Config; use PublicInbox::Syscall qw(EPOLLIN); -use PublicInbox::Spawn qw(spawn popen_rd); +use PublicInbox::Spawn qw(run_wait popen_rd); use PublicInbox::Lock; use PublicInbox::Eml; use PublicInbox::Import; @@ -905,8 +905,7 @@ sub _config { } my $cmd = $cfg->config_cmd(\%env, \%opt); push @$cmd, @file_arg, @argv; - waitpid(spawn($cmd, \%env, \%opt), 0); - $? == 0 ? 1 : ($err_ok ? undef : fail($self, $?)); + run_wait($cmd, \%env, \%opt) ? ($err_ok ? undef : fail($self, $?)) : 1; } sub lei_daemon_pid { puts shift, $$ } |