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 1C3241F5B7 for ; Mon, 29 Jun 2020 10:34:25 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 3/5] watch: ensure SIGCHLD works in forked children Date: Mon, 29 Jun 2020 10:34:19 +0000 Message-Id: <20200629103421.31016-4-e@yhbt.net> In-Reply-To: <20200629103421.31016-1-e@yhbt.net> References: <20200629103421.31016-1-e@yhbt.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: In case our git or spam checker subprocesses spawn subprocesses of their own. We'll also ensure signal handlers are properly setup before unblocking them. --- lib/PublicInbox/WatchMaildir.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/WatchMaildir.pm b/lib/PublicInbox/WatchMaildir.pm index 25b87e938e0..288f64d1e6c 100644 --- a/lib/PublicInbox/WatchMaildir.pm +++ b/lib/PublicInbox/WatchMaildir.pm @@ -527,8 +527,8 @@ sub watch_atfork_child ($) { delete $self->{poll_pids}; delete $self->{opendirs}; PublicInbox::DS->Reset; + %SIG = (%SIG, %{$self->{sig}}, CHLD => 'DEFAULT'); PublicInbox::Sigfd::sig_setmask($self->{oldset}); - %SIG = (%SIG, %{$self->{sig}}); } sub watch_atfork_parent ($) {