From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id B86CF1F513 for ; Tue, 20 Aug 2024 10:35:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1724150122; bh=pekjjgQ9n+yOVf/sEgEyrWmuoKjTSacZ8LMyXkgbbe4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=njBfiyEt+MNKlofgMWyPLEqeR2pPOWXNPgrsQfPx38Zsk5GX1mzMFk1BglPrVmDx7 BmVxQvKn1iZRM860h9JT2zatylYxMzt+zW9ZoEWouPjylx5bxSoFAaq4ku1H1C9yqK utl9+bzQ1W9mAhgQ4o53NvLwKrGIEbRENvUAL8c8= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 2/5] lei: simplify forced signal check Date: Tue, 20 Aug 2024 10:35:18 +0000 Message-ID: <20240820103522.3548609-3-e@80x24.org> In-Reply-To: <20240820103522.3548609-1-e@80x24.org> References: <20240820103522.3548609-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: There's no need to loop since a select call is enough to force signal handlers to be fired. --- script/lei | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/lei b/script/lei index a5aef956..d6cc4ef1 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);