From: Eric Wong Date: Tue, 20 Aug 2024 10:35:18 +0000 (+0000) Subject: lei: simplify forced signal check X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2e07b30461fd0b63e6ebb0c5a52287810855083;p=thirdparty%2Fpublic-inbox.git lei: simplify forced signal check There's no need to loop since a select call is enough to force signal handlers to be fired. --- diff --git a/script/lei b/script/lei index a5aef9568..d6cc4ef1d 100755 --- a/script/lei +++ b/script/lei @@ -139,6 +139,6 @@ while (1) { $sigchld->(); if (my $sig = ($x_it_code & 127)) { kill $sig, $$; - sleep(1) while 1; # no self-pipe/signalfd, here, so we loop + select undef, undef, undef, 0; # for kernel to act on signal } exit($x_it_code >> 8);