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 30989 invoked from network); 12 Jan 2023 17:15:03 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 12 Jan 2023 17:15:03 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1673543703; b=qZl71/FixPhzYSCZWQ/oOpDgFw4+JQw18+6W+h01Cs1LDenln5qbhHrgKW/qUz9dLVIhBCeNhs 3dALHMRFbIB+geRcNCzRWR9zf0kYGzgI5gGrP2kgPfHdFGKIaAUsXcrgfUfvZN7A4I0lsSqW/g vNJMZ5bcyUArhaNP6oMlSG69mKxBAEY57AtRm1yLizrEN0G4cMh1eM8PmcGRqvySOjFKU2p/35 zJAGrczP/FLNOTrFsUjgqRd6bFTUEvAFMTfG5RBST4g2QppRhf2T/cw2GjK53jJ+Gozm+AdZco SVTrU1s6JmKh7sepMTDwl6rg6ZM5Qc2cyYUXSBExoCXIQg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (out1-smtp.messagingengine.com) smtp.remote-ip=66.111.4.25; dkim=pass header.d=daniel.shahaf.name header.s=fm2 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm3 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1673543703; bh=DzTRaZGnM6z5bhWUD/3w3qSGau6iAdPWIwQtV1eJLhM=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Subject:To:From:Date:References:In-Reply-To: Message-ID:MIME-Version:DKIM-Signature:DKIM-Signature:DKIM-Signature; b=sdyFKHRwkIt3N9QYnXN198dz7YMJmC1hccTuS05sr3iAVh+3D2Zdk8kOGPD2vjbl9xCmFIKVyZ D48Jva5HpWRAOmFY6e23PBRIBzPGjIBFgPZn39QPQmXqiZnJ0TOgvCDvTobh3SeIAr1uJaH0Pd Bh+8Jw/0+wigJHnnPGtviuleoVGTsuwM3gvWx3/IhcS3sVnpxhfgWwoqWFZENyE63cd6LkzW2I OtM7oLXYv5ghqogV1Ktc0sH/vn6q5tcydJFmSmu3aZMi68Nu4sK3T8F98eglobUsLuc71v63zN 8Ivz1igvXEA0smU+p1jLqqF6VFnB6g3hdOQogAjHpSn4uQ==; 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-Type:Subject:To:From:Date: References:In-Reply-To:Message-Id:Mime-Version:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=PdVna0lM0yji5E3fLTcBhXlNOJ7JOURshulc+NVMbVg=; b=XeybtVgiWgKNFDAKDoa7So4r4w JZXIgXglKR9IV4k31iggNn4Uv9BeAtbmYsACpYP7WLx6Jf9nRXcNKcWb3vmC1asDdILNYkb2nJHnC VMvk8D1HzHjDPEPrmiFMtV5fy/3+RZS9dRdB+svHiJkN/wmPIGTgq8GRYbawazaOUtL0wpPX+iCH3 Btg0ZgeAYZp0ao83pGmwO27rdNuN3VAz4J8dZSG2rOp5nJTxSQSruyT8bZqUwSQuwI1v5Zs8iPNfS Ae1T8YLRCt1ZagppVyw6cAYe3oWQ81Kwrk/AnWeagkzXfFgqPTOxhGa0HtNwVhVul9xwGFqvgiZik 2L5/rSDg==; Received: by zero.zsh.org with local id 1pG1AM-0006in-8C; Thu, 12 Jan 2023 17:15:02 +0000 Authentication-Results: zsh.org; iprev=pass (out1-smtp.messagingengine.com) smtp.remote-ip=66.111.4.25; dkim=pass header.d=daniel.shahaf.name header.s=fm2 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm3 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none Received: from out1-smtp.messagingengine.com ([66.111.4.25]:43471) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1pG19i-0006Om-Nu; Thu, 12 Jan 2023 17:14:24 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 851E55C0101 for ; Thu, 12 Jan 2023 12:14:20 -0500 (EST) Received: from imap46 ([10.202.2.96]) by compute4.internal (MEProxy); Thu, 12 Jan 2023 12:14:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1673543660; x= 1673630060; bh=PdVna0lM0yji5E3fLTcBhXlNOJ7JOURshulc+NVMbVg=; b=p jfCLvMIXuLxJdb41buWHDNUy40AQRds9CEFW68/S+V5NB4fnL4k5/QCzF03eLF5c od4SvrmnSCnsMOCYFNT/rndxzyBKi72e8dAaiwY2uxv/7/BNDEQFy4ANToGHcN0v ANDKtYX1DwSIIQ7tIs8OMO1rEVnoJNpn2qvwu0vbus81oCEnjkEKZb4MZzxFTemU 3tFYh7+F8HEtoebsAq5/SxLjILmGcSkTCnqgp3VUF2EVcq0WkCCZOUKZ+WbB9dvl siSGrlj223duShR7BBjTySw/wmFDl3Uyy+HPgd2uH8/aHViuixYBw/+uKPonRtQy nRmzI1DEWLgah9aCuAqQw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1673543660; x=1673630060; bh=PdVna0lM0yji5E3fLTcBhXlNOJ7J OURshulc+NVMbVg=; b=THuTaBid4TtZ2reEi/WaJQtl0OoGHdUEDvO2TWqaIdGA yc+eFEc6njs9EDTwicpDD69nYxBbCLY95Y6qHlcy9FkefO3g675mcOHWhU68ntX6 YYrDarrrlkQXLa8CUPBIRYkw8eQarT5yZ32I9r7QwDzbY1HxrczQTzyp7iU7/WeF i7EWP3h5QLhcVKZLi1nS0xWDy9S1IvCT9bb0AXrmKKqhvvUVp4JJX449TVkEtyGJ NWcuh4Ie9DoXbzLim22GLuok7ypGXa+qZlA/DzBw+AwQHdh1/KK+c0O2wIcxe9NB e1Nguk9uNiqNpoLE9Sja6ALgOXphmDOe4b19C4SCQw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrleeigdelkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkjghffffhvffutgesthdtre dtreertdenucfhrhhomhepfdffrghnihgvlhcuufhhrghhrghffdcuoegurdhssegurghn ihgvlhdrshhhrghhrghfrdhnrghmvgeqnecuggftrfgrthhtvghrnhepjeeuveehueekje dtffegveelhfethefhlefhfffgudeuhfdtvdehhfejkeeghedtnecuvehluhhsthgvrhfu ihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepugdrshesuggrnhhivghlrdhshh grhhgrfhdrnhgrmhgv X-ME-Proxy: Feedback-ID: i425e4195:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 300642A20080; Thu, 12 Jan 2023 12:14:20 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-1185-g841157300a-fm-20221208.002-g84115730 Mime-Version: 1.0 Message-Id: <7a115b06-4268-409b-a8a8-5b683567a827@app.fastmail.com> In-Reply-To: <63758-1673479188.568367@mRHO.g-Av.gAfN> References: <63758-1673479188.568367@mRHO.g-Av.gAfN> Date: Thu, 12 Jan 2023 17:14:00 +0000 From: "Daniel Shahaf" To: zsh-workers@zsh.org Subject: Re: PATCH: move $ERRNO to the system module Content-Type: text/plain X-Seq: 51301 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: Oliver Kiddle wrote on Wed, 11 Jan 2023 23:19 +00:00: > This would not be a strictly backward-compatible change. > Does moving $ERRNO from the core to a module "reorder or add system calls" to the codepath that expands/evaluates uses of ERRNO? I.e., even assuming scripts already do load zsh/system, is it safe to assume the value of errno by the time Src/Modules/system.c code runs will be the same value errno had at the point execution with this patch diverges from execution without it? > My justification is that, given how close it is to the system, any > reliance on it is already liable to break just because we might reorder > or add system calls. How does the conclusion "It's fine to move ERRNO to a module" follow from the premise "Scripts that rely on ERRNO are liable to break if zsh.c changes"? It's not immediately clear that a script that guards against some C code modifying errno [possibly as a side effect] will also be safe against ERRNO having been moved to a module, cf. Stephane's example. > ERRNO is not especially portable, either. Portability is neither here nor there. > ERRNO predates the system module, and loadable modules in general. I had > even forgotten it existed until it was mentioned recently. I doubt it's > especially widely used. system.mdd does specify load=no so there would > be no automatic loading. The trick with defining it as PM_UNSET doesn't > appear to work from a module. But that's less necessary if the variable > is in a module. > > I'll allow plenty of time for dissenting opinions on this but it'd also > be good to hear if anyone agrees. Well, it's backwards incompatible and I don't understand the justification given, so I can't say I'm +1 on this. Cheers, Daniel