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 31443 invoked from network); 13 Apr 2021 18:04:20 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 13 Apr 2021 18:04:20 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1618337060; b=rXly8tnontXLlMMQrO9T4sY2bD27sfcRWux2bqG0BEfU3we2GqVeaZN0wc8Ctw5qhqEca6z061 wBV7egGjzCcV9aChi0c42zbY2IemugNwoCFFsVc6HVZvp4Gbif6QuZsyPa0QGVI5pxntwujBRf 2XE5NqhX+Qj9uFIgJAYMs1c6PxU1QXROReCG8PG7xuYZuiycPIkS1nydlHbElvpxXaSWqj2jNx /StK9pTNM4asp5xNDb4whKT0deXLOSAiYZhdkKXiytcBrEHgsP6xaGTMHFs8WYGxUVS+ALNRwI EHgzhtrUA2Vv5hFf0KIHb3YDdZ1x++Vpn7Zz7P1DfBcSYg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (gmmr2.centrum.cz) smtp.remote-ip=46.255.227.252; dkim=pass header.d=volny.cz header.s=mail header.a=rsa-sha256; dmarc=pass header.from=volny.cz; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1618337060; bh=FsfS02WkGfsUAlZa3acA50jUXZYbv/KkcPar6eOOSQQ=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Message-ID: MIME-Version:In-Reply-To:References:Cc:From:Date:Subject:To:DKIM-Signature: DKIM-Signature; b=z6allAN4aM4O5REWeqjxgL1GNvM7ox6KIg0yfHysfWDwnX7m8Y4A4cbUj5iWY14DwKPdsdml57 FJRXfJU3dq7/CP/kQ20dKgCySl1t5gmq3U562O9Y4AnDx6j1vCJ2yOzk057G+7/l2AKQvdQVaq z+X7bgxGvbC9WGe0QxNEcy3yTWe39iRK1ccpaSsrgchbuuci3JjYL3H2xRJECaoG78yCYDEJJo zSJF40CEScbxnLKmg07bJgWJGn/BzYSkogUU4Odop0EUgSaq6ig00JLwbK2ar4AKakfgbdRtEy aXWAwqvhkKq0LwucXwNFwpkyV42+SBR3hs1whFOcmS/lsg==; 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:Message-Id:MIME-Version:In-Reply-To:References:Cc:From:Date: Subject:To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=e1vUQdbAKBDZPr1NPzfLwMT7qOG1PTMXgIOkz1MmpkA=; b=MH9/MrWoDTFhXGrrGYlPjBk3oI ESHdl0fHgd3MqCjqITpE5cZ3+R0ynByjMBmcBYQsJafBjsmaEuuEtQpqfSFUZHZKX8gOKhgs3pF0A CLbxZ8VfI88viEppVWRmCNgB2VStbZd7K30pVVw3RFxR14VD0bkHU2VRkG6A11cJSPRFokn3FWRpw +lcNg0KPH9BKnWzDKs+btlncPgq7IGCc5liXNl6Eg5GrsrVnGVgvvbMNgw0OykmGbGPVn8CSZkeB9 XDlTTf/oQHSxIQVclS4m/WujFX+BKi0k9tHND8jXC1ruzEmZjy1dsg4O1BsuUyIhZX8w3RaQNzyFV wVu0ImHw==; Received: from authenticated user by zero.zsh.org with local id 1lWNOa-000Bsc-3f; Tue, 13 Apr 2021 18:04:16 +0000 Authentication-Results: zsh.org; iprev=pass (gmmr2.centrum.cz) smtp.remote-ip=46.255.227.252; dkim=pass header.d=volny.cz header.s=mail header.a=rsa-sha256; dmarc=pass header.from=volny.cz; arc=none Received: from gmmr2.centrum.cz ([46.255.227.252]:40516) by zero.zsh.org with esmtps (TLS1:DHE-RSA-AES256-SHA:256) id 1lWNO2-000Bec-Ew; Tue, 13 Apr 2021 18:03:43 +0000 Received: from gmmr-2.centrum.cz (unknown [10.255.254.12]) by gmmr2.centrum.cz (Postfix) with ESMTP id 7B7ED60047B5; Tue, 13 Apr 2021 20:03:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=volny.cz; s=mail; t=1618337021; bh=e1vUQdbAKBDZPr1NPzfLwMT7qOG1PTMXgIOkz1MmpkA=; h=To:Subject:Date:From:Cc:References:In-Reply-To:From; b=b9bAYuFwusRALu7991b8E2SsUIDcZ23HxrBUxwzeHSeKaVnNjk4XnaTz6Mjp425bJ iWdJMOUwX11P3vDfXdQw6cTxagXxncKkih9DecPeLd7vjNHuzX1pLjuAXRmmw3K2i0 KJWOybnojbo3+ZV1kIpx+wwTx4W1ujJ0VzFv2sHg= Received: from vm1.excello.cz (vm1.excello.cz [5.180.49.60]) by gmmr-2.centrum.cz (Postfix) with QMQP id 77EA077DE; Tue, 13 Apr 2021 20:03:41 +0200 (CEST) Received: from vm1.excello.cz by vm1.excello.cz (VF-Scanner: Clear:RC:0(2a00:da80:1:502::8):SC:0(-3.999999/5.0):CC:0:; processed in 0.2 s); 13 Apr 2021 18:03:41 +0000 X-VF-Scanner-ID: 20210413180341.261509.17456.vm1.excello.cz.0 Received: from gmmr-4.centrum.cz (2a00:da80:1:502::8) by out2.virusfree.cz with ESMTPS (TLSv1.3, TLS_AES_256_GCM_SHA384); 13 Apr 2021 20:03:41 +0200 Received: from mail1008.cent (unknown [10.255.254.31]) by gmmr-4.centrum.cz (Postfix) with ESMTP id 2BDAF20056054; Tue, 13 Apr 2021 20:03:41 +0200 (CEST) Received: by mail1008.cent (Postfix, from userid 33) id 23C026010E2C3; Tue, 13 Apr 2021 20:03:41 +0200 (CEST) To: =?utf-8?q?Daniel_Shahaf?= Subject: =?utf-8?q?RE=3A_patch=3A_zshmisc=281=29_clarify_non=2Dsuccessful_exit_statuses?= Received: from 46.135.84.18 by mail1008.centrum.cz (centrum.cz multimail) with HTTP Date: Tue, 13 Apr 2021 20:03:41 +0200 From: Cc: References: <20210411141520.4ABA89D5@volny.cz> <20210413155236.GR6819@tarpaulin.shahaf.local2> In-Reply-To: <20210413155236.GR6819@tarpaulin.shahaf.local2> X-Mailer: Centrum Email 5.3 X-Priority: 3 X-Original-From: MIME-Version: 1.0 Message-Id: <20210413200341.D91B3837@volny.cz> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Seq: 48539 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: Haai, "Daniel Shahaf" wrote: > Thanks for the patch. Review: > > zeurkous@volny.cz wrote on Sun, Apr 11, 2021 at 14:15:20 +0200: >> #?patch >> # > > What's this header line? Is this a standard format for unidiffs with > log messages? Should Functions/VCS_Info/VCS_INFO_patch2subject grow > support for it? No, it's a "shehuh" (me own convention), to indicate the format (in this case: input to patch(1)). Ignore it if you wish. The rest of the '#' lines are just comments (meknows patch(1) will relay && discard any lines before the actual patch, but IMO it shouldn't, hence the prefix). patch(1) will eat all this fine (at least it does on me side). > zsh's source code is in git. git's interchange format is `[PATCH]' in > the subject line, then in the body, everything up to a "---" line is > part of the log message, and everything after is not. See > git-format-patch(1) for details. Thanks, but me doesn't use git (me has me own, very sufficient, ways to keep track of things). So me just used 'diff -u'. > More below. > >> # These patches add, to the zshmisc(1) manual page, clarity about the >> # exit status on exec failure. >> # >> # Me understands that, strictly considered, only Doc/Zsh/exec.yo needs >> # updating; however, as me doesn't have yodl, me updated Doc/zshmisc.1 >> # as well. > > Thanks, but there's no need to manually update the .1 files; they aren't > in version control. Alright, me didn't realize. Me just has this little patch and me doesn't know if me'll ever have anything to contribute again... > >> # Hope this is useful (it is to me), >> # >> # --zeurkous, Sun Apr 11 11:12:21 UTC 2021. >> # >> --- Doc/Zsh/..v/5.8/exec.yo Mon Dec 4 14:09:35 2017 >> +++ Doc/Zsh/exec.yo Sun Apr 11 10:42:15 2021 >> @@ -16,7 +16,10 @@ >> Otherwise, the shell searches each element of tt($path) for a >> directory containing an executable file by that name. If the >> search is unsuccessful, the shell prints an error message and returns >> -a nonzero exit status. >> +127. >> + >> +If execution fails because of insufficient permissions, or because the >> +file is a directory, the shell prints an error message and returns 126. >> > > Does this sentence cover every possible case of returning 126? The > condition in the source is =C2=AB=3D=3D EACCES || =3D=3D ENOEXEC=C2=BB. Me wishes me had a guarantee. It probably differs from system to system (me runs OpenBSD); this is me best shot (for now). > Moreover, the > very next sentence says "the file is not in executable format", and it > would be odd to refer to the same condition by different noun phrases in > two consecutive sentences. In me defense: the whole text is a bit vague, and me's not sure me understands the subtleties enough to do a {,partial }rewrite of the section. > I don't like the newly-added paragraph break. Anyone who stops reading > at the end of that paragraph will think the return code is 127, period. Why would someone stop reading there...? > Also, stating the return values before going on to say that if the file > isn't a directory then it's exeuted anyway could be confusing, couldn't i= t? In all honesty: to me, the whole text is so unnecessarily unclear that me'd apply me usual solution of writing exit statuses in a table: If execution fails: one of the following values is returned. .Pp .Bl -tag -width 126 -compact .It Li 126 [...summarize the condition{,s} that cause{,s} it to return that...] .It Li 127 [...idem...] .El (That's in mdoc(7), not in man(7). Sorry.) However, if you folks would desire that: me has no idea how to write that in yodl, so mecan't provide a patch. > Should this part of the manual mention the AUTO_CD option? Dunno. It could unnecessarily complicate it. > A few paragraph below the value, 127, is mentioned again. Does that > sentence need to be updated? Me'd say that if the text above would be made sufficiently clear (with quotes of both diagnostic messages), that paragraph could be significantly curtailed, instead of extended. > Thanks for the patch! You're welcome :) > I realize the review is actually longer than the > patch, but, it's still shorter than the cumulative number of times the > new text will be read. Yeah. > Cheers, > > Daniel Take care, --zeurkous. >> If execution fails because the file is not in executable format, >> and the file is not a directory, it is assumed to be a shell >> =2D-=20 Friggin' Machines!