The lei/store process should only exit from EOF on the
socket, so make sure we note any unintended signals
---
lib/PublicInbox/LeiStore.pm | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lib/PublicInbox/LeiStore.pm b/lib/PublicInbox/LeiStore.pm
index 821045701dfe..16e7d302dc2f 100644
--- a/lib/PublicInbox/LeiStore.pm
+++ b/lib/PublicInbox/LeiStore.pm
@@ -571,6 +571,12 @@ sub recv_and_run {
$self->SUPER::recv_and_run(@args);
}
+sub _sto_atexit { # dwaitpid callback
+ my ($args, $pid) = @_;
+ my $self = $args->[0];
+ warn "lei/store PID:$pid died \$?=$?\n" if $?;
+}
+
sub write_prepare {
my ($self, $lei) = @_;
$lei // die 'BUG: $lei not passed';
@@ -587,7 +593,7 @@ sub write_prepare {
-err_wr => $w,
to_close => [ $r ],
});
- $self->wq_wait_async; # outlives $lei
+ $self->wq_wait_async(\&_sto_atexit); # outlives $lei
require PublicInbox::LeiStoreErr;
PublicInbox::LeiStoreErr->new($r, $lei);
}
--
unsubscribe: one-click, see List-Unsubscribe header
archive: https://public-inbox.org/meta/