From: Eric Wong Date: Wed, 5 Apr 2023 11:26:57 +0000 (+0000) Subject: cindex: workaround for FreeBSD missing SIGCHLD X-Git-Tag: v2.0.0~1206 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=38ba332f1ab2ef06583a7df8a0be8926064bf135;p=thirdparty%2Fpublic-inbox.git cindex: workaround for FreeBSD missing SIGCHLD This likely affects all other *BSDs with kevent, as well; since SIGCHLD is special w.r.t. EVFILT_SIGNAL --- diff --git a/lib/PublicInbox/CodeSearchIdx.pm b/lib/PublicInbox/CodeSearchIdx.pm index 1000dc6f0..82a96cf3d 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); }