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,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 88B131F49B for ; Wed, 5 Apr 2023 11:26:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1680693963; bh=J/rymwIzVWbR6bjkNfukvKzINnUNnFKtwkwjHXfup64=; h=From:To:Subject:Date:In-Reply-To:References:From; b=fzelGzEmHEYNRMN9OPAAHhFUGRbThImNi5758L1ejYgTXxiRfx/FposVRP3EkpHLq CCqejo5YJoiKgoownzKLn8G+lgh+/59Iey3+k4mWGU0BDVFkea+AhSDE+H4aQuSJyH 2MTXnkQ/Yz1dravlwKEaA2ndSq8sjT2gvisS0Qrs= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 6/7] cindex: workaround for FreeBSD missing SIGCHLD Date: Wed, 5 Apr 2023 11:26:57 +0000 Message-Id: <20230405112658.90216-7-e@80x24.org> In-Reply-To: <20230405112658.90216-1-e@80x24.org> References: <20230405112658.90216-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: This likely affects all other *BSDs with kevent, as well; since SIGCHLD is special w.r.t. EVFILT_SIGNAL --- lib/PublicInbox/CodeSearchIdx.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/PublicInbox/CodeSearchIdx.pm b/lib/PublicInbox/CodeSearchIdx.pm index 1000dc6f..82a96cf3 100644 --- a/lib/PublicInbox/CodeSearchIdx.pm +++ b/lib/PublicInbox/CodeSearchIdx.pm @@ -636,6 +636,11 @@ EOM sub scan_git_dirs ($) { my ($self) = @_; + + # FreeBSD ignores/discards SIGCHLD while signals are blocked and + # EVFILT_SIGNAL is inactive, so we pretend we have a SIGCHLD pending + PublicInbox::DS::enqueue_reap(); + @$GIT_TODO = @{$self->{git_dirs}}; index_next($self) for (1..$LIVE_JOBS); }