From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 9EECF1F55F for ; Mon, 4 Sep 2023 10:36:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1693823767; bh=AsbDlXHhn0rKqIl23/5YphJ/gpZqb5ELplWdrkrukZE=; h=From:To:Subject:Date:From; b=gdOrW1YYXuWm1bq8byk4+2rM8FwEr4ocQFsZxNJUoQb3dfuMr4ngZCGtanXCbj/SB DgHnzb6KJGCm/6i3yJROIDEaIe6bu+6EYEPKvMtiWQIhwZI9f+aCj9eXMiFeLgRYDB MpdZw2gF3fHpjRjB30+Lkw+aLyrBkxY9ZpAfing4= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 00/10] signal-handling and *BSD fixes Date: Mon, 4 Sep 2023 10:35:57 +0000 Message-ID: <20230904103607.1940839-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: kevent EVFILT_SIGNAL behaves differently than Linux signalfd in that we can't rely on it to handle signals that were sent before the existence of the kevent filter. Thus, [5/10] opens a window before entering the event. This difference between OSes was noticed due to lei tests quickly starting read-only daemons and terminating them before signal handlers were setup properly from the lack of SCM_RIGHTS support on *BSDs lacking Inline::C. Nevertheless [9/10] improves test dependency management to ensure read-only daemons don't start all when SCM_RIGHTS support is unavailable. Patch [10/10] was originally far more aggressive in that it kept all signals blocked across execve, but that's probably unrealistic for real-world scenarios 7/10 to add TTOU/TTIN support to xap_helper was actually the first developed in this series. Lots more brewing in the portability department... Eric Wong (10): ds: don't block important signals we don't use t/sigfd: test EVFILT_SIGNAL vs signalfd differences t/sigfd: better checks related to SIGWINCH update devel/syscall-list to devel/sysdefs-list daemon: workaround pre-EVFILT_SIGNAL signals watch: ensure children can use signal handlers xap_helper: support SIGTTIN+SIGTTOU worker adjustments xap_helper.h: include signal.h for sig* functions tests: add `+SCM_RIGHTS' as a require_mods target test_common: start_script: set default signals MANIFEST | 2 +- devel/{syscall-list => sysdefs-list} | 47 ++--- lib/PublicInbox/DS.pm | 38 +++- lib/PublicInbox/IPC.pm | 2 +- lib/PublicInbox/Sigfd.pm | 3 +- lib/PublicInbox/Syscall.pm | 7 +- lib/PublicInbox/TestCommon.pm | 26 ++- lib/PublicInbox/Watch.pm | 7 +- lib/PublicInbox/XapHelper.pm | 103 +++++++--- lib/PublicInbox/xap_helper.h | 283 +++++++++++++++++++++++---- script/public-inbox-watch | 4 +- t/lei-import-nntp.t | 4 +- t/lei.t | 3 +- t/sigfd.t | 28 ++- t/xap_helper.t | 59 ++++-- 15 files changed, 489 insertions(+), 127 deletions(-) rename devel/{syscall-list => sysdefs-list} (60%)