From: Eric Wong Date: Sun, 21 Feb 2021 18:28:15 +0000 (+0600) Subject: lei-daemon: prefer graceful shutdowns X-Git-Tag: v1.7.0~1087 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=4f4fa052e6caf470632a2e8a8ea5113c97f0ba21;p=public-inbox.git lei-daemon: prefer graceful shutdowns We'll keep the daemon alive as long as a a script/lei client remains connected. This ought to improve user experience and is in line with what -imapd/-httpd/-nntpd users have expected over the years. --- diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm index 0b4bc20e..8d49b212 100644 --- a/lib/PublicInbox/LEI.pm +++ b/lib/PublicInbox/LEI.pm @@ -1101,6 +1101,8 @@ sub lazy_start { exit($exit_code // 0); } +sub busy { 1 } # prevent daemon-shutdown if client is connected + # for users w/o Socket::Msghdr installed or Inline::C enabled sub oneshot { my ($main_pkg) = @_;