user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 6/5] t/spawn: fix test reliability
  @ 2020-07-07  6:17  7%   ` Eric Wong
  0 siblings, 0 replies; 1+ results
From: Eric Wong @ 2020-07-07  6:17 UTC (permalink / raw)
  To: meta

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

^ permalink raw reply related	[relevance 7%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2020-06-29 10:34     [PATCH 0/5] watch: Maildir fixes Eric Wong
2020-06-29 10:34     ` [PATCH 4/5] spawn: unblock SIGCHLD in subprocess Eric Wong
2020-07-07  6:17  7%   ` [PATCH 6/5] t/spawn: fix test reliability Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).