From: Eric Wong Date: Tue, 11 Oct 2022 00:05:54 +0000 (+0000) Subject: dskqxs: fix loop to allow `next' X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=6cdb3cfe9c0aa747c20922ed438636bf74b47b62;p=public-inbox.git dskqxs: fix loop to allow `next' `do {} while(...)' loops in Perl don't support `next', actually :x This only affects *BSD platforms with IO::KQueue installed. Fixes: d6674af04cb74a4e "httpd|nntpd: avoid missed signal wakeups" --- diff --git a/lib/PublicInbox/DSKQXS.pm b/lib/PublicInbox/DSKQXS.pm index eccfa56d..7141b131 100644 --- a/lib/PublicInbox/DSKQXS.pm +++ b/lib/PublicInbox/DSKQXS.pm @@ -71,7 +71,7 @@ sub READ { # called by sysread() for signalfd compatibility my $nr = $len / 128; my $r = 0; $_[1] = ''; - do { + while (1) { while ($nr--) { my $signo = shift(@$sigbuf) or last; # caller only cares about signalfd_siginfo.ssi_signo: @@ -94,7 +94,7 @@ sub READ { # called by sysread() for signalfd compatibility # field shows coalesced signals, and maybe we'll use it # in the future... @$sigbuf = map { $_->[0] } @events; - } while (1); + } } # for fileno() calls in PublicInbox::DS