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 18779 invoked from network); 16 Jan 2023 21:35:10 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 16 Jan 2023 21:35:10 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1673904910; b=sjQE0y9R5HQv5aYRa6gsxTAGkqiMhJZkIehokJeTUpOejUtNgl12aO4KD6XBN1SHHdxJJ8hlUV jKJg8AISrG5MzwdOEua7fpXEcVLZ+uR/IFFCwLu8AL4mtHxoFLKewgfnUTJ4mKMQlKIRQ7+7bm aTDEi6/SPbaEXxNZ1BfWAaIP2ntDXKqC+RhEbVEjOL+PO+xeHkNmIkAnveZeg6awBJ0pogD9oS FKvqVHzZ9xAFjVlzxwGB7bd/Fy5WbpGUV3SvolZwR6ItHV0vA1CaVTlYPixeEEPPq2RlexLU6c WGBN3LrSgneulVjy2hNRxnZiOav31uEnk8DlhVkJreRd2Q==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f51.google.com) smtp.remote-ip=209.85.218.51; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 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=1673904910; bh=Ygw3cTCN9fBpgzMwr/dKt0sgcmrtP6/Ir2jB1x62RZo=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=AOHbt/NgSRXCInpeoYEKz7yPNi+O3uX+x1MY8/nQKqkmZUCioQALjcpoh+YYbwAXflggPClXC3 yKaFviBwbGGgzKvwU/6uSkrz+C6kZ1WtUge8nOV3ZZVPyzawvEzYKY82DVekXm/EOd7RkoMHFc n0PRH/F7Jz0znoBE3EeHBim+pyw2Y4L3QRqgDWuU8geXbpuVY7x5ZZpupwAjfl6bYA+2tnp1lL OeyLeNeDsBu1f8i3QTD8aK0Yyappnz3Org2hiYXN6YMJUoN6WOk/dfElvMnkO65OmzXE1U2MD9 vw5LnMh1hds9/xQRcp/wnvR6GqNipH1vRtbuAvVAtc2lkw==; 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:To:Subject:Message-ID: Date:From:In-Reply-To:References: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=M0nKY+r+GAaqPfFSvW1OtltJBBrvTJxL0m+EdphS0PM=; b=BrS1OUBz5Iq2DEpAhDuxP/pXOc jnRvV6qDP0zQjxAd1FeKp6Fnruk1+M8c6+GlM+hL3hnfadkJbBHITAmncZBXog+bO6uwTad63ANWl b+FfEngj1bk5f6GPuUhRDU4OesuX2NQ+LGLWJzZ8Xzh8t3ecFXcQoeFEeYp/6RWD7Vba7rjIKPERb Ohgq/5J0JrsWyFrfXzFH8yt28ppym/PCywoh24BXmjylxiz2ZUw7XTqDyyCLb/U78TILdACfvYZjB K46yzkyYwDNb36cyID9/oeVKDafbWYIuRY5PdSTHIlr7SeGp0cmBYZQ/Z+HCpgx+qL8DtqUiSgvbB /6biPssQ==; Received: by zero.zsh.org with local id 1pHX8G-00053d-SW; Mon, 16 Jan 2023 21:35:08 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f51.google.com) smtp.remote-ip=209.85.218.51; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ej1-f51.google.com ([209.85.218.51]:38802) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1pHX7i-0004iJ-6v; Mon, 16 Jan 2023 21:34:35 +0000 Received: by mail-ej1-f51.google.com with SMTP id cf18so64570714ejb.5 for ; Mon, 16 Jan 2023 13:34:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20210112.gappssmtp.com; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=M0nKY+r+GAaqPfFSvW1OtltJBBrvTJxL0m+EdphS0PM=; b=1E3rbkyRTd1O6Oqbb+TMFf3YSsVEi0TYrJrHOk68GKyC8A6B/FEL9rANCiogovUmGo EZxXWh2ytzfGR1OhHL9ePtOTuWYBOnhz1BgIpdEsUtFFiaA2w+lzTnIb5rUGuLokh4ht tzAZiUGMCGbizHobVY2yzipcsBf/6T1+D2in3BT5i9R62jjyoECLVHEK+TteIJM9+Rx2 x32gH08Et11iLrn5plknasDOmI+lBXJPgXs95ITT87t6QI6qcEaOuhiGOC8vYnC1u7wd WNvqjmwWLMeDOunvqodrgEgOWqDK2R80i3JDwJAqow5g2odr6rFuiK5M4/DcpFI1wLG7 eBbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=M0nKY+r+GAaqPfFSvW1OtltJBBrvTJxL0m+EdphS0PM=; b=aL9uF2JlpfFwhuJJl6gIV/HcMsk+IXLPFO0fIdZKX9MAZNskjKZH2HHGBzbGxrDflU BJCG2GGegKaaY91cvgUBfHZl/kS0XtZw6yw7E+w1vlBN2NOt/PGpZqrO83gZ00oWKHX6 HFci1wkXLSqwUrOoa/v+C4Fb/GaRsAytuaLA86YHzJDaD4kxkDaSwei6/q+AD/JKvIVR vKRn1jplde2Pfo0u+8YJHWHXDme83rZ5ilNzk/OJ5qHbVOuvKqHVMBX9jjYpYADEYD6R x+RdQ7qiaPjFfpmWr23206DeHqwnG+QeFoDvdSvqXuumJNe/PZQ4O76DBfchPFeDEL0W h14Q== X-Gm-Message-State: AFqh2ko+X2I4O6FQbY9PMmj/rF76/k2Y9DwuLPIpRHgO4r+M34PfPKF6 ifRfijgRnjq3+BAtTWQO/8fQItQwkSBHquGNW+hWPIlnvY/bqQ== X-Google-Smtp-Source: AMrXdXsXqT9M8YQzUuepC7QC9BmoM/resin8ZO+leDZ5RG/StvYoZvJat8yeSg8lR6OK42fHcd3fo0aGLhP/fgrqAI4= X-Received: by 2002:a17:906:f9d5:b0:86e:65b8:e908 with SMTP id lj21-20020a170906f9d500b0086e65b8e908mr26668ejb.450.1673904873577; Mon, 16 Jan 2023 13:34:33 -0800 (PST) MIME-Version: 1.0 References: <63758-1673479188.568367@mRHO.g-Av.gAfN> <7a115b06-4268-409b-a8a8-5b683567a827@app.fastmail.com> In-Reply-To: <7a115b06-4268-409b-a8a8-5b683567a827@app.fastmail.com> From: Bart Schaefer Date: Mon, 16 Jan 2023 13:34:22 -0800 Message-ID: Subject: Re: PATCH: move $ERRNO to the system module To: zsh-workers@zsh.org Content-Type: text/plain; charset="UTF-8" X-Seq: 51308 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 Thu, Jan 12, 2023 at 9:15 AM Daniel Shahaf wrote: > > Does moving $ERRNO from the core to a module "reorder or add system > calls" to the codepath that expands/evaluates uses of ERRNO? As far as I can tell system call changes would only occur in circumstances where the module could not be loaded at all. On the other hand, that circumstance also renders ERRNO useless. > Oliver Kiddle wrote on Wed, 11 Jan 2023 23:19 +00:00: > > ERRNO predates the system module, and loadable modules in general. It doesn't just predate the system module, it predates the zsh source import to git. > > The trick with defining it as PM_UNSET doesn't > > appear to work from a module. Hm, that might be worthy of some further digging. Aside, is Src/modentry.c present for any reason other than as some kind of example? It's been around since at least 2007 (workers/23479, approximately) but it's not referenced anywhere, not even in zsh-development-guide. > Well, it's backwards incompatible and I don't understand the > justification given, so I can't say I'm +1 on this. On the one hand, workers/32337 already made a backwards-incompatible change to ERRNO in the name of POSIX script compatibility, so any really old scripts that used it will already have needed updating. Moving it to a module is just another step in that direction, and actually fixes the "must set before use" issue (obviously by replacing it with "must load module before use"). On the opposing hand, the existence/use of ERRNO has been recently discussed on the lists, the change to document the previous incompatible change is also recent, and there have been other changes to make the value of ERRNO more correctly reflect actual error states. So his might not be an ideal time to introduce yet another such change. I'm net-zero on this.