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 98B201F5AE for ; Mon, 29 Jun 2020 10:34:21 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 0/5] watch: Maildir fixes Date: Mon, 29 Jun 2020 10:34:16 +0000 Message-Id: <20200629103421.31016-1-e@yhbt.net> In-Reply-To: <20200627100400.9871-1-e@yhbt.net> References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: The introduction of NNTP and IMAP support in -watch introduced some annoying-but-non-fatal regressions for existing Maildir users, in one case due to a race fix. https://public-inbox.org/meta/20200627100400.9871-1-e@yhbt.net/ It turned out -watch could missing full scans at startup due to the old alarm(1)-triggered scan firing too soon, and switching to signalfd(2)[*] exposed performance problems fixed by [PATCH 1/5] in this series. PATCH 2/5 was just a minor debugging change while I was fixing commit 52e37476e8e62e8e54104d9a2abcf2a86d1d1a32 ("eml: header_str_set: correctly encode UTF-8 headers") 3 & 4 may not be strictly necessary at the moment, but they could be in the future if subprocesses (spamc, git) we spawn ever depend on SIGCHLD. More signals may be unblocked in subprocesses in the future, perhaps only SIGINT (from Ctrl-C) could remain masked. Finally, 5/5 fixes the zombies introduced which kicked off the investigation into this series. Eric Wong (5): watch: check for duplicates in ->over before spamcheck watch: show path for warnings from spam messages watch: ensure SIGCHLD works in forked children spawn: unblock SIGCHLD in subprocess watch: make waitpid() synchronous for Maildir scans lib/PublicInbox/Import.pm | 2 +- lib/PublicInbox/Spawn.pm | 11 +++++++--- lib/PublicInbox/SpawnPP.pm | 5 +++++ lib/PublicInbox/V2Writable.pm | 2 +- lib/PublicInbox/WatchMaildir.pm | 37 +++++++++++++++++++++++++-------- t/spawn.t | 27 ++++++++++++++++++++++++ 6 files changed, 70 insertions(+), 14 deletions(-)