about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-07-07 06:17:24 +0000
committerEric Wong <e@yhbt.net>2020-07-07 20:38:57 +0000
commit80a4e0da8cba8f782eb6083a0bc54dd8d84be238 (patch)
treea2d41c5cfb2d114c8e8720b0efa22123a0101f05
parentc0f3095c2f0fdf3409a2d7bc629230cd83a06f9f (diff)
downloadpublic-inbox-80a4e0da8cba8f782eb6083a0bc54dd8d84be238.tar.gz
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")
-rw-r--r--t/spawn.t2
1 files changed, 1 insertions, 1 deletions
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();