From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 66B2D15810F for ; Sun, 11 Jun 2023 16:47:19 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A7BCDE089C; Sun, 11 Jun 2023 16:47:18 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 552C3E0898 for ; Sun, 11 Jun 2023 16:47:18 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5682D3413E2 for ; Sun, 11 Jun 2023 16:47:17 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A9D33A92 for ; Sun, 11 Jun 2023 16:47:14 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1686473502.a930fa7a97375463d02cde833f6f31c5aef479e9.sam@gentoo> Subject: [gentoo-commits] proj/gentoo-functions:master commit in: / X-VCS-Repository: proj/gentoo-functions X-VCS-Files: ecma48-cpr.c X-VCS-Directories: / X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: a930fa7a97375463d02cde833f6f31c5aef479e9 X-VCS-Branch: master Date: Sun, 11 Jun 2023 16:47:14 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 88b5da11-e9f0-42ae-9fd7-496a5456131e X-Archives-Hash: bb4630a2bdd21eddc0c0b40cc6f6a59d commit: a930fa7a97375463d02cde833f6f31c5aef479e9 Author: Kerin Millar plushkava net> AuthorDate: Sun Jun 11 08:49:19 2023 +0000 Commit: Sam James gentoo org> CommitDate: Sun Jun 11 08:51:42 2023 +0000 URL: https://gitweb.gentoo.org/proj/gentoo-functions.git/commit/?id=a930fa7a ecma48-cpr: Ignore SIGINT, SIGTERM and SIGTSTP There seems little sense in honouring these signals at the point that the terminal settings are about to be altered and the CPR sequence written. Signed-off-by: Kerin Millar plushkava.net> ecma48-cpr.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ecma48-cpr.c b/ecma48-cpr.c index 7d32c63..5a0f936 100644 --- a/ecma48-cpr.c +++ b/ecma48-cpr.c @@ -99,6 +99,13 @@ main(void) { sigaction(SIGALRM, &act, NULL); + /* + * Ignore the signals most likely to interrupt the process from hereon. + */ + signal(SIGINT, SIG_IGN); + signal(SIGTERM, SIG_IGN); + signal(SIGTSTP, SIG_IGN); + /* * Try to apply the new terminal settings. */