From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 06DD41F9FD for ; Sun, 21 Feb 2021 18:28:16 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] lei-daemon: prefer graceful shutdowns Date: Mon, 22 Feb 2021 00:28:15 +0600 Message-Id: <20210221182815.13439-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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. --- lib/PublicInbox/LEI.pm | 2 ++ 1 file changed, 2 insertions(+) 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) = @_;