From nobody Mon Jun 16 08:54:04 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4bLP1m4yK6z5VqD6; Mon, 16 Jun 2025 08:54:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bLP1m21Jrz3wVD; Mon, 16 Jun 2025 08:54:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1750064044; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dZoDen9LJMTul+B/B8tMYmH9qMmG66L8yaQo/WcVMhY=; b=VHAotpBxvNpowD9CbsSIE0eLiE+Urkg5zaXCBpGeReNdPRwSkIJK1sllfxUXPb9RN7TkTC 71q92o1aqZX677xBU7qogXYJFx9QymRECwVW/BzOylrFi/adQ6K3BbPQNobmj6E+H5iYTs fe5oF8jiDQTfrc8c85R9XULB7v3/CYPxC5XVfaApXFux061nQtPdUXPEbL2Xd8H4CP2EQZ J1bVID9iN2LM3xmZKvRiyOdxrWW04kUSkjlvYCn5BfD1syvwgZXn7wHuUJW+S8/Dqy24Yh u3jiALBjl3dXvAA38WloLZZS3nKkVeMpotsK6OBd48ei+/yKQRBBJGU7nNepyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1750064044; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dZoDen9LJMTul+B/B8tMYmH9qMmG66L8yaQo/WcVMhY=; b=FQLcCYofnknEpClek7EjSB3O0n78OtvHNwVTSr1uA28MPziW/47doe6uI06PFQxoUHg5L2 cTL1JP0leteZV+si//2Q17uvhSesxU5pB2aMHM82RtarVBexaR3yJYt9q1Gx9zjvG9Lqz5 Akfz7ItMCKbJN0qOxAZlctAETcGKaEvTuZjLg6q7Wml3Hwxk0kPBRdMbgzkZNrxtVH9J5o Zl+RSgLVbKYhuQbAqqPDDP2DHyjoNqb5iigDsJaOK4m9L8iJyEZVDJXkDBktv0h3w3UANN dsfLcHVk2xuNTV8lQxWvgE92OGmtCKx20qyKC2SleLEDi/LpYEBmDIzkpEmlqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1750064044; a=rsa-sha256; cv=none; b=Sw5c+4GDgqy7jAh+X0AbnZeLaeIb6WUnTvcbMaoUFCuEhGp+b7FFPTz6/aDRcY7NFME4uI /1eEtZFo8OpCqhKQtL7oDdH/R9ukV9AM3MSGw9d+QkwzI/UiPt3o81RGatGCRo2muJGUWH a5RJBCd14fUnmMcDQXa6HFChea+8llwnt8wl67l6j6PBv/A0qZZl0JK9uIoRMJoWYmunYc YmTBBefGcKgAOZ88EwYy2V93D+7VWx1RJ0o8XtBs8XJlLDsJC7h2OJMaK09yORWaREIOhK faXTkNa/I/hPixBBpzYyNUjezvypeLhsYDOmOTTAb5DWZzf01QWLCIUaAd2HNQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bLP1m0wnZzrqm; Mon, 16 Jun 2025 08:54:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 55G8s4EE043320; Mon, 16 Jun 2025 08:54:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 55G8s4ct043317; Mon, 16 Jun 2025 08:54:04 GMT (envelope-from git) Date: Mon, 16 Jun 2025 08:54:04 GMT Message-Id: <202506160854.55G8s4ct043317@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: e59571c5a789 - stable/14 - timeout(1): Fix the handling of repeated terminating signals List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e59571c5a78988a13eeaa473302a4029a459022f Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e59571c5a78988a13eeaa473302a4029a459022f commit e59571c5a78988a13eeaa473302a4029a459022f Author: Aaron LI AuthorDate: 2025-04-02 16:14:40 +0000 Commit: Konstantin Belousov CommitDate: 2025-06-16 08:51:53 +0000 timeout(1): Fix the handling of repeated terminating signals (cherry picked from commit aae3eb24dfdbbe0a9e62fe7239d6038060cd07f6) --- bin/timeout/timeout.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/bin/timeout/timeout.c b/bin/timeout/timeout.c index e702803a25c2..c3c7532a9d08 100644 --- a/bin/timeout/timeout.c +++ b/bin/timeout/timeout.c @@ -49,7 +49,6 @@ static volatile sig_atomic_t sig_chld = 0; static volatile sig_atomic_t sig_term = 0; static volatile sig_atomic_t sig_alrm = 0; -static volatile sig_atomic_t sig_ign = 0; static const char *command = NULL; static bool verbose = false; @@ -138,11 +137,6 @@ parse_signal(const char *str) static void sig_handler(int signo) { - if (sig_ign != 0 && signo == sig_ign) { - sig_ign = 0; - return; - } - switch (signo) { case SIGINT: case SIGHUP: @@ -377,19 +371,11 @@ main(int argc, char **argv) if (do_second_kill) { set_interval(second_kill); do_second_kill = false; - sig_ign = killsig; killsig = SIGKILL; - } else { - break; } } } - while (!child_done && wait(&pstat) == -1) { - if (errno != EINTR) - err(EXIT_FAILURE, "wait()"); - } - if (!foreground) procctl(P_PID, getpid(), PROC_REAP_RELEASE, NULL);