* [PATCH 2/3] lei: restore old sigmask before daemon exit
2021-09-25 5:49 5% [PATCH 0/3] lei: some robustness fixes Eric Wong
@ 2021-09-25 5:49 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2021-09-25 5:49 UTC (permalink / raw)
To: meta
If the event loop fails, we want blocking waitpid (wait4) calls
to be interruptible with SIGTERM via "kill $PID" rather than
SIGKILL. Though a failing event loop is something we should
avoid...
---
lib/PublicInbox/LEI.pm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm
index 9d5a5a46b398..3ff8a347af8b 100644
--- a/lib/PublicInbox/LEI.pm
+++ b/lib/PublicInbox/LEI.pm
@@ -1346,6 +1346,8 @@ sub lazy_start {
# $daemon pipe to `lei' closed, main loop begins:
eval { PublicInbox::DS->EventLoop };
warn "event loop error: $@\n" if $@;
+ # exit() may trigger waitpid via various DESTROY, ensure interruptible
+ PublicInbox::DS::sig_setmask($oldset);
dump_and_clear_log();
exit($exit_code // 0);
}
^ permalink raw reply related [relevance 7%]
* [PATCH 0/3] lei: some robustness fixes
@ 2021-09-25 5:49 5% Eric Wong
2021-09-25 5:49 7% ` [PATCH 2/3] lei: restore old sigmask before daemon exit Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2021-09-25 5:49 UTC (permalink / raw)
To: meta
It out I can still fine localtime confusing if I'm constantly
switching timezones to fit wherever insomnia puts me.
I also noticed an odd failure triggered by augment_inprogress
which I can't reproduce. In any case, a progress message
shouldn't cause catastrophic failure.
Eric Wong (3):
lei up: show timezone offset with localtime
lei: restore old sigmask before daemon exit
lei2mail: augment_inprogress: guard against closed FDs
lib/PublicInbox/LEI.pm | 2 ++
lib/PublicInbox/LeiToMail.pm | 15 +++++++++------
lib/PublicInbox/LeiXSearch.pm | 2 +-
3 files changed, 12 insertions(+), 7 deletions(-)
^ permalink raw reply [relevance 5%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2021-09-25 5:49 5% [PATCH 0/3] lei: some robustness fixes Eric Wong
2021-09-25 5:49 7% ` [PATCH 2/3] lei: restore old sigmask before daemon exit Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).