diff options
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, $$ } |