]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
lei: simplify forced signal check
authorEric Wong <e@80x24.org>
Tue, 20 Aug 2024 10:35:18 +0000 (10:35 +0000)
committerEric Wong <e@80x24.org>
Wed, 21 Aug 2024 18:16:24 +0000 (18:16 +0000)
There's no need to loop since a select call is enough to force
signal handlers to be fired.

script/lei

index a5aef9568c33b918d58b2d33611a4a6804fcf11e..d6cc4ef1d6d0b7f30c3083266fcb553c1fa6e8c8 100755 (executable)
@@ -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);