From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: from zero.zsh.org (zero.zsh.org [IPv6:2a02:898:31:0:48:4558:7a:7368]) by inbox.vuxu.org (Postfix) with ESMTP id 34A5C21750 for ; Sun, 21 Apr 2024 23:38:10 +0200 (CEST) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1713735490; b=crh2JWsAWNNW4UX4bwGXMdwoXMr5vc5ZUnwGH5xdpuKjATGYLPBGtP7yexIRL8bxX0zODWH5uw Epoe+neh83d9zhGgpsUaLaY6LnTCkGp/zy60k5cJw+cZo2rVftY1rn+raxbIUNhlMh50M0//rA U9tiF6fa3fiBqMKUN3Prz0G2WIquet7xPzQcS8HEG25cwPxUU7JO3kDEcIC8Q52l4R0GVoCnUd FIj79z0mvo8EHlrZqspMrT/6RQeqQbhgJjMez7v2+becocBIu8w5QQNpJZjf8li8CNTl9yQytE 5SrMA3QQ6fx1oAuPxj1mznXPUwxbKzZ7XRoRy8eyVsSarw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f52.google.com) smtp.remote-ip=209.85.218.52; dkim=pass header.d=brasslantern-com.20230601.gappssmtp.com header.s=20230601 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1713735490; bh=KLQ7XCwWn2JLsFr3gyKKTf6syZoxr3CZI9m5sjsWup0=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:To:Subject:Message-ID: Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature:DKIM-Signature; b=pd6icmfrOBcyO2N91ZbTw82UB0C7JU1GhZgchUu1xnlYUbJU+qMHstytdLT97N1LUcGmvxQRy5 HwRzskva2cNhqh8gR/VtUKfvJ66L+V5+Kd9i6SnSIZY/k2ko47McI1cVebeLZMt9EsthgaBUad jzSjB/Qy5cbKE5OPPzPL7HsrAXIeKnH8KURqxq4jPKdiLUu2p6Z/bxW0A/xEXmkWD/gtNov+Kz b0WcVMZtAbZNaUTiwyFIT5YkOeBklNJYPM65pe8+amNGtKB1YHqfjcm4LNnj4Q4pqX0vQ4siAw cOTjuCnL1Hf3l8anH1AzTTGofhNZvGVixQmPCl8geG8lAg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=KLQ7XCwWn2JLsFr3gyKKTf6syZoxr3CZI9m5sjsWup0=; b=FUNterUyAEILQmX2FdsxwnBdFG zcSJWIMtBOqOpajuKbJVoMMWeSI2ucXXy8WGi4Q3IB+d7TJCz9m0vjgEY3ZsnSz0DqKmozjmdE7Xc hxqcTWYPl4KRZW1tu0dlOtjIES7Vek809/JN87OnlgbpS0ASnyoMJZhEk9K33xvqETMFFYY/mk+5F QNg3KVayl9GBL49HOSNhXxnnChlM8daPH0Pcvk+GB9ZrqoC2xAt53I6QzqjSDOpaR3F32q+4mjlWI hVREAxGLQDZl7HPNgTYmBBAogIrC9RXNoFxGe5mvRcfce/cXna0vTDVb+WQyvYfk9cv5VviNj3gH7 GVHAox7Q==; Received: by zero.zsh.org with local id 1ryet0-0009X5-NT; Sun, 21 Apr 2024 21:38:10 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f52.google.com) smtp.remote-ip=209.85.218.52; dkim=pass header.d=brasslantern-com.20230601.gappssmtp.com header.s=20230601 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ej1-f52.google.com ([209.85.218.52]:61530) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1ryegx-000897-UZ; Sun, 21 Apr 2024 21:25:44 +0000 Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-a524ecaf215so389659566b.2 for ; Sun, 21 Apr 2024 14:25:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20230601.gappssmtp.com; s=20230601; t=1713734743; x=1714339543; darn=zsh.org; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=KLQ7XCwWn2JLsFr3gyKKTf6syZoxr3CZI9m5sjsWup0=; b=NZNmf/P7YPGas7v9uPYxRmWNE14N/iANivGrmH0TJrV9DtfuKS9AEzf+AOhvzc5f+f YllcqSf0Od1zv0nq1xckqt6xGaVzaWz7V7SGolaWI3Pq4oMGH4gk9f1pbQ9hI1hM1mXI Zv+YqiLiJvAoZQiXVJVm1T7ZNhVkh8u82m8UVNarrbeJgmuQxqOSQfn0kpm5aUeORLao nwf223AGJ9hOKjzis+q6AtvhTT5ncKLXq19eCWo967QRY17EncKITN3EeBREORuN5fkC LYSm/F/GQSyXmAbo1HMDm5TGHypJnRdGUHhOGIl+aNSMEyCW8+6vIvo3OJkvw53/WaBB gsrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713734743; x=1714339543; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KLQ7XCwWn2JLsFr3gyKKTf6syZoxr3CZI9m5sjsWup0=; b=hk/DQWKbMpaBccDzqCdbDstH27hkI+3tSKZjqKNUVFiOZNkv2ukmezGt8Brvg6BheI a8YnaGQDejg1GyLdb7tJg/yrnze7aqOMzTHT8LQWLrQNg/Aq3Tbm2bKnVh9de3dj9hc3 Uvz5SNlfT2w6bFQ7umxWGZWn7QZ+r6/bFymQRIyY66k7/0l1K1mSocruljCBOaBfB0OP e3T7V9YD9DxOTo8VjmGnGRlciYXvBJLhGhGQlkM36ocgmBWMt5cFjT+r8Y12/KVJRaDu FmfpZfFRf+S5BEOYgCIJY1WcZtoq6lPfT2bVWWpIsWaljcUxkDYMxlSylMpqTNYWAu+P f2Xg== X-Gm-Message-State: AOJu0Yz03fOUiF7NBhtGsunB7bHzIIlBGIavSlxWysOl4xBxI5ndmE6g 4y4oSBEhXqjf/jfTFDa3EV5GMJ7XmcBJ3+OiemWA3S23A4ruNDDAsHDkEn9r+DTBSfzHmasAUEF gTph6uid75vI0Ni5XcW2NgHBQ/zE41BwTIBdVhxGbaykaM0tREQ== X-Google-Smtp-Source: AGHT+IG4GCRoTEOnmynO1NbAWCD06a6mZgPEmbZNilwiF7NiJoZl99ciHiNAhTgf6OQPF90O2Dwd4P4baPkuE6LEIZs= X-Received: by 2002:a17:906:2491:b0:a55:63d3:7499 with SMTP id e17-20020a170906249100b00a5563d37499mr4874896ejb.59.1713734743104; Sun, 21 Apr 2024 14:25:43 -0700 (PDT) MIME-Version: 1.0 References: <20240419171752.GA48158@cventin.lip.ens-lyon.fr> <20240419190027.GA109916@joooj.vinc17.net> <20240419213225.GA146837@qaa.vinc17.org> <20240421172909.GB146837@qaa.vinc17.org> <20240421174358.GC146837@qaa.vinc17.org> In-Reply-To: <20240421174358.GC146837@qaa.vinc17.org> From: Bart Schaefer Date: Sun, 21 Apr 2024 14:25:31 -0700 Message-ID: Subject: Re: How to propagate SIGTERM to the foreground job, if any? To: zsh-users@zsh.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 29856 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: On Sun, Apr 21, 2024 at 10:44=E2=80=AFAM Vincent Lefevre wrote: > > > xterm was just a very simple example. In practice, several commands > > are involved, and among them, there are zsh functions that may need > > to affect the environment. This seems to work: trap 'kill -TERM -$$ ; exit' TERM > Moreover, a Ctrl-C in the terminal doesn't seem to be handled > correctly Which terminal? > (here, ssh-add with several files in argument is executed > via zsh functions, but it refuses to quit on Ctrl-C). Does this mean you can't interrupt it while it's prompting for a passphrase= ? Can you reproduce this with something other than ssh-add ?