From a848cb1e2229e0b313271dad879f9a101e414316 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 2 Feb 2021 22:11:42 -1000 Subject: lei: use sleep(1) loop for infinite sleep Perl may internally race and miss signals due to a lack of self-pipe / eventfd / signalfd / EVFILT_SIGNAL usage. While our event loop paths avoid these problems by using signalfd or EVFILT_SIGNAL, thse sleep() calls are not within the event loop. --- script/lei | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'script') diff --git a/script/lei b/script/lei index 58f0dbe9..40c21ad8 100755 --- a/script/lei +++ b/script/lei @@ -116,7 +116,7 @@ Falling back to (slow) one-shot mode sigchld(); if (my $sig = ($x_it_code & 127)) { kill $sig, $$; - sleep; + sleep(1) while 1; } exit($x_it_code >> 8); } else { # for systems lacking Socket::MsgHdr or Inline::C -- cgit v1.2.3-24-ge0c7