From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id CCAE61F5AE; Tue, 7 Jul 2020 06:17:25 +0000 (UTC) Date: Tue, 7 Jul 2020 06:17:24 +0000 From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 6/5] t/spawn: fix test reliability Message-ID: <20200707061724.GA63260@dcvr> References: <20200629103421.31016-1-e@yhbt.net> <20200629103421.31016-5-e@yhbt.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200629103421.31016-5-e@yhbt.net> List-Id: 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();