diff options
author | Eric Wong <e@80x24.org> | 2019-11-15 09:50:41 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-11-16 11:05:23 +0000 |
commit | b05207350b218972fc7614c75b49eaae26f9013a (patch) | |
tree | 5a48419793ce37783e6199ffd00a41887bee8bf3 /lib/PublicInbox/Xapcmd.pm | |
parent | 2500dfda84f86a8b83e89bf69cfd32ace54edead (diff) | |
download | public-inbox-b05207350b218972fc7614c75b49eaae26f9013a.tar.gz |
We need to bypass whatever Test::More does with END/DESTROY handlers for use in lon-lived process. This doesn't affect any of our normal code since we don't use END/DESTROY for Xapcmd and its callers.
Diffstat (limited to 'lib/PublicInbox/Xapcmd.pm')
-rw-r--r-- | lib/PublicInbox/Xapcmd.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/PublicInbox/Xapcmd.pm b/lib/PublicInbox/Xapcmd.pm index 77f0524e..28285898 100644 --- a/lib/PublicInbox/Xapcmd.pm +++ b/lib/PublicInbox/Xapcmd.pm @@ -9,6 +9,7 @@ use PublicInbox::Search; use File::Temp qw(tempdir); use File::Path qw(remove_tree); use File::Basename qw(dirname); +use POSIX (); # support testing with dev versions of Xapian which installs # commands with a version number suffix (e.g. "xapian-compact-1.5") @@ -85,7 +86,7 @@ sub cb_spawn { defined(my $pid = fork) or die "fork: $!"; return $pid if $pid > 0; $cb->($args, $opt); - exit 0; + POSIX::_exit(0); } sub runnable_or_die ($) { |