]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
cindex: workaround for FreeBSD missing SIGCHLD
authorEric Wong <e@80x24.org>
Wed, 5 Apr 2023 11:26:57 +0000 (11:26 +0000)
committerEric Wong <e@80x24.org>
Wed, 5 Apr 2023 20:12:20 +0000 (20:12 +0000)
This likely affects all other *BSDs with kevent, as well;
since SIGCHLD is special w.r.t. EVFILT_SIGNAL

lib/PublicInbox/CodeSearchIdx.pm

index 1000dc6f055b0510c25be44a5fc0e0fa073c1934..82a96cf3d1a71d8f9d4ee19f574b23a78a322887 100644 (file)
@@ -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);
 }