diff options
author | Eric Wong <e@80x24.org> | 2021-01-20 14:04:44 +0900 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-01-21 03:29:17 +0000 |
commit | 19f20f44e325523cebe5665d887003a4f75cc1c0 (patch) | |
tree | 8b28b5fc094c8d86884aa3f2df90798a7a5e2d56 /lib/PublicInbox | |
parent | 3dde6fa1268e2f86f10f26b7d427598e582aed2a (diff) | |
download | public-inbox-19f20f44e325523cebe5665d887003a4f75cc1c0.tar.gz |
waitpid() in DESTROY ends up setting $? for the exit status, thus we must reap IPC children before calling CORE::exit. This fixes t/lei-oneshot.t with TEST_RUN_MODE=0
Diffstat (limited to 'lib/PublicInbox')
-rw-r--r-- | lib/PublicInbox/LEI.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm index f3edfe82..97ae2c41 100644 --- a/lib/PublicInbox/LEI.pm +++ b/lib/PublicInbox/LEI.pm @@ -249,6 +249,11 @@ sub x_it ($$) { if (my $sock = $self->{sock}) { send($sock, "x_it $code", MSG_EOR); } elsif (!($code & 127)) { # oneshot, ignore signals + # don't want to end up using $? from child processes + for my $f (qw(lxs l2m)) { + my $wq = delete $self->{$f} or next; + $wq->DESTROY; + } $quit->($code >> 8); } } |