diff options
author | Eric Wong <e@80x24.org> | 2023-10-03 06:43:49 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2023-10-03 10:16:07 +0000 |
commit | ed646e22f30102c89fa481aa0d64629e4ccb33ac (patch) | |
tree | f98e3fce0bde373b867a00ecd35639bd66fef161 /lib | |
parent | 8fbb07b8ef6de3709b15790180975ce0282483ab (diff) | |
download | public-inbox-ed646e22f30102c89fa481aa0d64629e4ccb33ac.tar.gz |
We don't want workers continuing after their stdout has triggered EPIPE or some other write error. This fixes xt/lei-onion-convert.t to ensure the quit_waiter_pipe is fully-closed at daemon teardown during tests. Using the `exit' perlop still ensures OnDestroy callbacks will fire.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/PublicInbox/LEI.pm | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm index 817772f7..10c08b90 100644 --- a/lib/PublicInbox/LEI.pm +++ b/lib/PublicInbox/LEI.pm @@ -485,6 +485,7 @@ sub x_it ($$) { stop_pager($self); if ($self->{pkt_op_p}) { # worker => lei-daemon $self->{pkt_op_p}->pkt_do('x_it', $code); + exit($code >> 8); } elsif ($self->{sock}) { # lei->daemon => lei(1) client send($self->{sock}, "x_it $code", 0); } elsif ($quit == \&CORE::exit) { # an admin (one-shot) command |