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.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 25097 invoked from network); 12 Jul 2021 12:13:42 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 12 Jul 2021 12:13:42 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1626092022; b=FqEcC2Fa468oOVsnN6IIU1MS4xSLco/PyNAscpknvNL1CVEXpDt0nLrcxmGGDwtZqBm0HGUYSx 6mW59ICKpQQXL/1k0ApNbspULvGMpKmsL6Zz3jdGV6mm9RrgeePlfkijwDkWVht3m5JrBEOXqy SyR8QRmgdOJbK8a25OY8t3RI7bYi69n9Edl+W6GsrmLWSLRRCln7AAsJumwgfqEwdgya0hQhNg T79tCgNdqzzNfjwokXLW8PvVx1JNMUGo28IvDUzAqgomOAsc358T1B5pCwtHjOP5WI6ZMVdIqZ BU4NuHHUH2KGMdRcdZVtpqJrh8ucX0jib8071GVt+j5JdA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (smtpq5.tb.ukmail.iss.as9143.net) smtp.remote-ip=212.54.57.100; dkim=pass header.d=ntlworld.com header.s=meg.feb2017 header.a=rsa-sha256; dmarc=pass header.from=ntlworld.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1626092022; bh=bUSpBaY27mw5gTpOLGsKzEJxO6lp206VVIpJm/fHrVg=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject: References:In-Reply-To:Message-ID:To:From:Date:DKIM-Signature: DKIM-Signature; b=vfdMy/365YiX1UO5sip9Uq7XjjOXt2ydqQFl6UcviEjSsmOaboyUnWjOoORqGGDIZROzII+UTJ yXdXCG3kAmfNDG32MA/bc0LtuUnQHE7g5/F/FBvokBNAtjJ5XHBvJIyo8JjHcUtdR08qC3wLsb 0cZJXRbv6sOuXh8V4BVK0r5pHIRbyMqVS4ET6P4IONMGed3UrFFRgR0SpRoxn0ynmUvfvopyh1 hyuD1kDd3az8HM9DY3exoR4gv74UNuuXfaATwZ0b7xPnBn/1s1vFcbiIQfqkLN/D+iaXRo4Xeg x31bdb5/LOQm8Zy1xZsdARFgh/1LQxxgvL9r/qPvS5Gl4w==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Subject:References:In-Reply-To:Message-ID:To:From: Date:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=RAsQQxiMMDgobtLzk5kkJhqcqaRBxK6hR7Y2AWkBkt0=; b=GHS0zFE9+9Rtdr2h4gByjAIb/c D0IYxk+DO0onq477wiEZn09i9mVBKJ/212p2Jbm0KUSvvW8zAA4nhXHS10H2kNUwM8WAo7DKfmCTm hI4CUXhB9dvnO7opEb5qd4FCLpyqecdmG3IWhWMsjjc+6XREAv7Uq+WMi1T5ZGVWm+8xMeJ8hYiYt LhkMXvlzdPs8YOgTf7A+dmfxQHOdSIijb6Z8Mjft+fsZKdJduRep6HW4/ISpTqZFsEVBD9LpHOn+i l2QZs1M7eidxb/bcww9+Wmmtc0UZKbm0ehGiDxv5p4uuIZFumCg19gKhVSEbqxT2iiI+zdVngweyY SjTS5HuA==; Received: from authenticated user by zero.zsh.org with local id 1m2uof-000BZ0-Qy; Mon, 12 Jul 2021 12:13:41 +0000 Authentication-Results: zsh.org; iprev=pass (smtpq5.tb.ukmail.iss.as9143.net) smtp.remote-ip=212.54.57.100; dkim=pass header.d=ntlworld.com header.s=meg.feb2017 header.a=rsa-sha256; dmarc=pass header.from=ntlworld.com; arc=none Received: from smtpq5.tb.ukmail.iss.as9143.net ([212.54.57.100]:58246) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) id 1m2uoL-000BGi-7Q; Mon, 12 Jul 2021 12:13:22 +0000 Received: from [212.54.57.80] (helo=smtp1.tb.ukmail.iss.as9143.net) by smtpq5.tb.ukmail.iss.as9143.net with esmtp (Exim 4.86_2) (envelope-from ) id 1m2uoK-0000we-LC for zsh-workers@zsh.org; Mon, 12 Jul 2021 14:13:20 +0200 Received: from oxbe8.tb.ukmail.iss.as9143.net ([172.25.160.139]) by smtp1.tb.ukmail.iss.as9143.net with ESMTP id 2uoKmyDnYhdxk2uoKmgsR8; Mon, 12 Jul 2021 14:13:20 +0200 X-Env-Mailfrom: p.w.stephenson@ntlworld.com X-Env-Rcptto: zsh-workers@zsh.org X-SourceIP: 172.25.160.139 X-CNFS-Analysis: v=2.4 cv=Ru2mkAqK c=1 sm=1 tr=0 ts=60ec31e0 cx=a_exe a=pgSR3NrKiwmx/6vnWRL19w==:117 a=Xg4ulZQXJ4UUkvAS:21 a=sfM75MaK4YAA:10 a=IkcTkHD0fZMA:10 a=2y5beTJ5bSgA:10 a=YR4_K0clAAAA:8 a=-f96QoR5t-dpuRkAGrQA:9 a=QEXdDO2ut3YA:10 a=vGu1X--ZNYtN8AW67h_V:22 a=waMAY2KAzxQUlx2gRwsv:22 X-Authenticated-Sender: p.w.stephenson@ntlworld.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ntlworld.com; s=meg.feb2017; t=1626092000; bh=bUSpBaY27mw5gTpOLGsKzEJxO6lp206VVIpJm/fHrVg=; h=Date:From:To:In-Reply-To:References:Subject; b=sT8AOyuhaXONsyY/HRKwIGeAlLpO73Y34anvsppl8JFumrXWR3h0K6JNZIAQSh3Rc g/NwJiyHfiVke1i4CW3fOeVwv/1nH5O5iA4X3hfa4EoDNtINnpl39VfjgPl3k3QrWQ lDo+gnjqAedOz0MWijROYV0ejSu8JFMk5xRQkNZpmnEtnpv80lr1TBUkitGx5z6IsN UVpPjRGCEyMJ/GcCitkbsQ8c0Lg1ZCZ+rF4BBMMFyWZQgcjPxy0w3dBd895EbVWIIc j0nM/YTQ371HP5iMkr1tNReIJt59dt2DZ+UOSuKL9kJHzl+SSr1xMDK1mTkCjQvhnb sjhxv+hjbncXQ== Date: Mon, 12 Jul 2021 13:13:20 +0100 (BST) From: Peter Stephenson To: Vincent Lefevre , zsh-workers@zsh.org Message-ID: <1681826594.99933.1626092000365@mail2.virginmedia.com> In-Reply-To: <20210712100224.GA9599@cventin.lip.ens-lyon.fr> References: <20210712100224.GA9599@cventin.lip.ens-lyon.fr> Subject: Re: [BUG] zsh dies in case of EIO with echo in .zlogout / ENOTTY MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v7.8.4-Rev72 X-Originating-IP: 165.225.81.118 X-Originating-Client: open-xchange-appsuite X-CMAE-Envelope: MS4xfDRgB8E5N0e22y3h4XqkvfqFBeRbOR4Fnafa7BYUWwbqBW3io/h/UmruG8lUyuaSkJrZsF/gioyxz9DBMvI0eMO2ds624j0rEA54oAUNehuRwg4wnGkt 7DJk1MROynaId+i8ISSjhAimpCz1W0MMCGEjhA1x2L6crRXnq6N+wdtdcXirysUw35tt62V2jZQbgvI/w7CmgoBRU5zI7CQM/ZQ1whHju8eEtKG4VDIU6uFQ 1kanv76egccGB7WZgyCfRQ== X-Seq: 49162 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 12 July 2021 at 11:02 Vincent Lefevre wrote: > In my .zlogout, I have an "echo" command. However, if the terminal > is no longer there, the "echo" yields EIO errors and the remaining > of the .zlogout is not executed, e.g. with "echo foo" in .zlogout > and > > xterm -e strace -f -o str.out zsh -l That's equivalent to this: % cat source.zsh exec 2>&- echo Exiting2 >&2 echo Exiting % ./zsh % . ./source.zsh % The inability to write to stderr to report the error writing to stderr (I think, so not the original error on the *request* to write to stderr, the fact it couldn't report the error) is treated as a hard error and causes the sourced script to fail at that point. Not sure what the right answer is. We've also been looking at complaints that zsh doesn't take errors with echo seriously enough... pws