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);
 }

Reply via email to