From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 99D261F403 for ; Tue, 11 Oct 2022 00:06:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1665446760; bh=GDKYDZ3OKTT7BRidH5K5iYBvlv6Mtb7f0nYS9ZIUxDE=; h=From:To:Subject:Date:From; b=MR52onC6XF2Zz8la6oNxBof9tXVyKNmpFQfeBHmnx5DqhcqBqTansqLldejoxDfST Htqdp4V8FuSBddOZOKpBxJQXNf4/RCigENzNBCiTIvMwbfqmu959N2C2KDdE6pNGLR yJnBxpZ9akXMvcxiqtXkpN95iNqJEkJbu1JdJguk= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] dskqxs: fix loop to allow `next' Date: Tue, 11 Oct 2022 00:05:54 +0000 Message-Id: <20221011000554.33099-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: `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(-) 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