From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 8928 invoked from network); 26 Apr 2022 10:07:44 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 26 Apr 2022 10:07:44 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1650967664; b=jkJPNjy6YvmS/A5716g4cgVV8cqZ5ot9wjw2UVOiz60MV5efBpHIpVKGuvg+pRxzjyGgbJnA+k V258bR+1+yAaA/5vnjMJAz+bSLqvyodX+8EagrfKMO3STRjrHsYmtp3GCZBrRpT5iLs27BLQy4 sYY1WdXm3s2bveekzap/ORz/msehLsi1zGKRIDYc2B5SEzvNMscdd718ZDe91D1/+2pDJ1ji53 K5GS1Vz+wv5pp1HOSM5O4iLsVVeCLnzlZ82oU4qUG36QuxHnQbDwaRnU0fbUYJsTYJHigi1y+M AJ0Jcp/zua9MkTLGzJQ1QvCaPF1JM9aKEF3zx4abyJ0+Uw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (joooj.vinc17.net) smtp.remote-ip=155.133.131.76; dmarc=none header.from=vinc17.net; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1650967664; bh=HWJ1qBR1+oxP3ETNWpqlL9iQa1IYNUH83AW1wyH/190=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Transfer-Encoding:Content-Type: MIME-Version:References:Message-ID:Subject:To:From:Date:DKIM-Signature; b=LLUroxxAJDUb1cDMNIAvp39osxbZ/fvtOpD2BgQJJ//K5Qrf09CrEEKOFxFFQGb1gmrwulAQ3c KZ5Ex4evJHyZQV3wGQp48Ib4yioTLGWK2J5A9GgCqyg3DQtsbkAnnNlXazoYLNqQrThlvznw+5 nXq0kI7oDiBjpy6fRB/+7CoFlzRvN7Sy+R+ZWIX1iciHyfYlC+aGrvVt2q50gLv878+RuRPTdF 0IfxAeBd9MaCCjQv2q8fxFgRuCDT8dffZ18fU8Je4H6w5VUKtwu+hlIGlWC1uLRWn+RGQmX8NO f6SXjckVXrtM/sfm+IT03L1oTdzKrzxZqH+wWH8RAOgH2A==; 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:In-Reply-To:Content-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:To:From:Date: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=NfBgQOd8HOYeBeIzlwF83p48IKWhUX2ecQVYVBZkDlw=; b=DB2GBcOj/qV9i97Ub4viuX9In7 nIneIy4cc5wTszhbS+D/NTBQgzAvLXnRSwzsrK7S5IFaWmIVqmlN7rv9LQV9rAzIK7lHU8N7XxdgF Zb1DaPzxR4cJDUXkrS+8VT8YtCBt3Kq9VTk1MaX4+BHfEKKs8IvAD/FtNCtHVbnOBO0N81/DxFRB1 WuhmTVttKsXnL2nnABcvTLSXXAU/QDUYbb2hfl4h4WiIHHCh6gvc7DNAX5jgP0+roMvbpHXL15vC+ uV4YGrIgCj4heREoKr5m+/hs7rT4qM05V2eyX8r4JK3mgH9sxBdngg8UcRCZqZwQC6osLnD/EzkZ2 Hcw5BzTw==; Received: from authenticated user by zero.zsh.org with local id 1njI6f-000HXX-CK; Tue, 26 Apr 2022 10:07:41 +0000 Authentication-Results: zsh.org; iprev=pass (joooj.vinc17.net) smtp.remote-ip=155.133.131.76; dmarc=none header.from=vinc17.net; arc=none Received: from joooj.vinc17.net ([155.133.131.76]:52932) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1njI69-000HDG-Un; Tue, 26 Apr 2022 10:07:10 +0000 Received: from smtp-zira.vinc17.net (128.119.75.86.rev.sfr.net [86.75.119.128]) by joooj.vinc17.net (Postfix) with ESMTPSA id 1BAF6258; Tue, 26 Apr 2022 12:07:09 +0200 (CEST) Received: by zira.vinc17.org (Postfix, from userid 1000) id DFD88280025E; Tue, 26 Apr 2022 12:07:08 +0200 (CEST) Date: Tue, 26 Apr 2022 12:07:08 +0200 From: Vincent Lefevre To: zsh-workers@zsh.org Subject: Re: pipeline that cannot be interrupted Message-ID: <20220426100708.GA129732@zira.vinc17.org> Mail-Followup-To: zsh-workers@zsh.org References: <20220426003649.GA100943@zira.vinc17.org> <20220426030002.GC100943@zira.vinc17.org> <20220426090722.GD100943@zira.vinc17.org> <20220426091833.GE100943@zira.vinc17.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220426091833.GE100943@zira.vinc17.org> X-Mailer-Info: https://www.vinc17.net/mutt/ User-Agent: Mutt/2.2.3+10 (6e7437c4) vl-138565 (2022-04-12) X-Seq: 50106 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: On 2022-04-26 11:18:33 +0200, Vincent Lefevre wrote: > Date: Fri, 2 Aug 2019 16:51:06 +0200 > From: Vincent Lefevre > To: zsh-workers@zsh.org > Subject: [BUG] pipeline that cannot be interrupted with Ctrl-C (regression) > > With zsh 5.7.1 under Debian, the following pipeline cannot be > interrupted with Ctrl-C: > > { /bin/sleep 10 ; /bin/sleep 20; } | { /bin/sleep 30 ; /bin/sleep 40; } > > But if I remove one of the sleep, it can be interrupted by Ctrl-C. > > There was no issue with zsh 5.3.1 (Debian 9). > > Note: I mentioned this example in zsh-users in the thread > "kill the LHS command of a pipe once the RHS command terminates". More tests similar this one: zira% { echo L1 > /dev/tty /bin/sleep 10 echo L2 > /dev/tty /bin/sleep 20 echo L3 > /dev/tty } | { echo R1 > /dev/tty /bin/sleep 30 echo R2 > /dev/tty /bin/sleep 40 echo R3 > /dev/tty } R1 L1 ^CR2 ^C^C^C^C^\^\ So the "/bin/sleep 30" gets interrupted by Ctrl-C, then Ctrl-C and Ctrl-\ are ignored until "/bin/sleep 40" ends. With "date" (a command) instead of the "echo" builtin, the signals are ignored until the "/bin/sleep 20" ends, and before the 3rd date command: zira% { date "+L1 %F %T" > /dev/tty /bin/sleep 10 date "+L2 %F %T" > /dev/tty /bin/sleep 20 date "+L3 %F %T" > /dev/tty } | { date "+R1 %F %T" > /dev/tty /bin/sleep 30 date "+R2 %F %T" > /dev/tty /bin/sleep 40 date "+R3 %F %T" > /dev/tty } R1 2022-04-26 12:00:50 L1 2022-04-26 12:00:50 ^C^C^C^\^\L2 2022-04-26 12:01:00 ^C^C^C^\^\ zira% with the prompt at 2022-04-26 12:01:20. -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)