Since Perl doesn't internally use a self-pipe for
sleep/select/poll/etc, wake up every 10ms to ensure
it can see the SIGCHLD; since neither signalfd nor EVFILT_SIGNAL
are always available.

Fixes: 761baa2a300e4268 ("spawn: unblock SIGCHLD in subprocess")
---
 t/spawn.t | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/spawn.t b/t/spawn.t
index fd669e22..a0019202 100644
--- a/t/spawn.t
+++ b/t/spawn.t
@@ -29,7 +29,7 @@ elsif ($pid > 0) {
        $? == 0 or die "child err: $>";
        $SIG{CHLD} = sub { print "HI\n"; exit };
        print "RDY $$\n";
-       sleep while 1;
+       select(undef, undef, undef, 0.01) while 1;
 }
 EOF
        my $oldset = PublicInbox::Sigfd::block_signals();
--
unsubscribe: one-click, see List-Unsubscribe header
archive: https://public-inbox.org/meta/

Reply via email to