From 6cdb3cfe9c0aa747c20922ed438636bf74b47b62 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 11 Oct 2022 00:05:54 +0000 Subject: 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" --- lib/PublicInbox/DSKQXS.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/PublicInbox/DSKQXS.pm') 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 -- cgit v1.2.3-24-ge0c7