From 80a4e0da8cba8f782eb6083a0bc54dd8d84be238 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 7 Jul 2020 06:17:24 +0000 Subject: t/spawn: fix test reliability 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(); -- cgit v1.2.3-24-ge0c7