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 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 1515 invoked from network); 12 Jan 2023 08:48:16 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 12 Jan 2023 08:48:16 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1673513296; b=nWd+k163gPuSZ/jIy9AdSHPJZnq7+2Jmy612ts8OU2wFRxbXz88nHMdxomwviDd91/DB+n+O+V 2GwsuAUt6x91+TD4X3nxdsON7f3DTP3PPC8SfsNsTseMD/1HwTLzPKusaPYEPGpDbNXJI0H0+2 MmJIxrhgeA2bFfmsSBFYURfYRDsG1AwCeRVfJYL+8xFDyJcgXStmevL2dtBW+kHXH02h2xpJfe 5htsSmh15lIDFkXc6ImIgFDaZftfPBAPSAjtzPayjYBvz3I25a/0kS8WI5VqgEdMfXSGLaZlQr NkzJKZNTsMMR9gNYkv+j0Olp4e1imDBeTuTE7iNssljAiw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (relay10.mail.gandi.net) smtp.remote-ip=217.70.178.230; dmarc=none header.from=chazelas.org; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1673513296; bh=SMaQbkQTGq+Kc7VmWN7IBIy69jMXoukwV92YrMRsvbc=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:DKIM-Signature; b=YOJvVkQJ0Y14U61dzrDhffrmEtnWs0hJKhVVObMknNbQEkER7eNsuH2UADY34anhVb+XCJX89j wK0gU4zdDKzd4RsmJMqDES3PbOFzCbhEGCAooyvPETrWxMfQTe20cn2TjY5dhtBzggkDPZc7HJ rYxt902gR/lDDlTUmJEXXcPORbhFoHFQ4Z5+FCS439HV489rW0ijWWLYu7TfWYRM5BJ+K5xYvY 16f0GG1TWye2djbVGoNArnXWYwYRijQXyUAoNmOxO6r+AzIBpIwkQlH4RYi9GEAC3rH2fb9RTG HDFLTx7iXmLVQaI714fBYXv1GA2xoPxG5AF+UT0+CKHFDg==; 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-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=CDlYczgFX6TKF/ZGNESM2Gg+jTMoXrk7oeYEZPNATyc=; b=PgGCXZxhGmEb40pTEc1T638x6S x8g9RkCmbsl7LB5K4OjoWpLo+OdepBYXBb7UZkZI5lIqLn04wp1TDPtdyrwVPVcJFQWVKHp8T0AlH HYf1jbvXlPn4OcfrsQnBez32gWEp5AXCMe2yniX+1Sou1P6nv1YPVOJ88CYdRZiCHoO6rE7lMDgku /YItCeKju9G2n9u6XNG8Cqqv6H91XNlsiHoQayrY8NI4kY8CpE88bCRXA/Y9AWJPpvZ+fXzLes4bT DKYhHVrTyh1O637c5MABoPvzL+tcUnBOh4haesc6u7T3ZCTg4lFP0oxDyjUZeh1+/h1NX1Do1pWlD CVneKhgg==; Received: by zero.zsh.org with local id 1pFtFt-000Kiu-Ul; Thu, 12 Jan 2023 08:48:13 +0000 Authentication-Results: zsh.org; iprev=pass (relay10.mail.gandi.net) smtp.remote-ip=217.70.178.230; dmarc=none header.from=chazelas.org; arc=none Received: from relay10.mail.gandi.net ([217.70.178.230]:46839) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1pFtFM-000KQ6-Gy; Thu, 12 Jan 2023 08:47:41 +0000 Received: (Authenticated sender: stephane@chazelas.org) by mail.gandi.net (Postfix) with ESMTPSA id C450E240009; Thu, 12 Jan 2023 08:47:38 +0000 (UTC) Date: Thu, 12 Jan 2023 08:47:37 +0000 From: Stephane Chazelas To: Oliver Kiddle Cc: Zsh workers Subject: Re: PATCH: move $ERRNO to the system module Message-ID: <20230112084737.tq6uppqd7io7bj3v@chazelas.org> Mail-Followup-To: Oliver Kiddle , Zsh workers References: <63758-1673479188.568367@mRHO.g-Av.gAfN> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <63758-1673479188.568367@mRHO.g-Av.gAfN> X-Seq: 51300 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: 2023-01-12 00:19:48 +0100, Oliver Kiddle: > This would not be a strictly backward-compatible change. [...] Use cases where people go out of their way to check $ERRNO, would be ones where it matters that errors be checked. If you move it to a module, then scripts that do: ERRNO=0; something && ((!ERRNO)) will start to silently ignore errors. See https://unix.stackexchange.com/search?q=user%3A22565+zsh+errno for some use cases of $ERRNO by me. Note that we need zsh/system to translate ERRNOs to EXXX codes or error messages, but we don't always need to. It's true ERRNO is not very reliable though and one should probably not rely too heavily on it, though in general the problem is that it reports more errors than you'd like. The EILSEQs that get in the way when you try to check whether a glob expansion can be trusted to have found all matches in particular come to mind. -- Stephane