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,
T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham
autolearn_force=no version=3.4.4
Received: (qmail 1877 invoked from network); 25 May 2022 09:53:28 -0000
Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368)
by inbox.vuxu.org with ESMTPUTF8; 25 May 2022 09:53:28 -0000
ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1653472408;
b=B4t8yVSB0fJq5cMoOh4KkHtQeeHvQN+7KaMRyEcORmMdxOWAfYSKqW4CGxjQEOZetBFw9K29Z+
KXcxgEoN41GZq61FyZ+qZ1nPwCuurg+PJkXXP+gWGn8Z5NDitnELE9mCHF2UsHEMLQ0dPChOb+
3zTpwU2qKEQoiyQBXDYseS78DwbVQSZa0X85csdoyTspw+FsCDqzsrDvBWN/8vgPr/WrjtEOLG
DZnRd3aoDNaj/9QnkqderbVNFcjU1VP9p05pjUToWjO5ccDrwVDf82dgDlfEEXbifyxGs9/qC1
AF4iqd6zjFEk7rpdCULCQ44uq2+bwDGpysZ9qW7lS0Qk4A==;
ARC-Authentication-Results: i=1; zsh.org;
iprev=pass (smtpq1.tb.ukmail.iss.as9143.net) smtp.remote-ip=212.54.57.96;
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-20210803; t=1653472408;
bh=VUtMfq3Ctiwde3xrzAZMJ7gHxWmobnnFOwXgQbd2PiY=;
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=CBBuxlUnMxe9oHwI8E4iFrQ1t/AEXKXQlmKgV8YrVE+PHpx/98FnydvPl0A5PpBF2ukDZtWBc4
SIHrcjQuhXOvFvqH3jACJw+iQkB3ZixGoGJ/Dt3I+jebo4aIrQ09wcWnTIQud3n+iKtNebASKm
8w1sj8mbYvBqFR0zvrVlvu8HB1jJ+n0+MrEOsFnXjlJLAEo3Vnxs0TAUWYdOCwhwpgz62rgjOo
z8uk88pWsQq8sAiwfjr16r1W3rSh3lm5JahqoyhMyz2tYgUDjjcZIFHP/fZTj/gyvYMyX6wSsH
wxcvyIPShzBZKAME7u4QkPElaV2tzkIASeQ4B56XhR+UKQ==;
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-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=29lA0RpElCgRkJuVjvyETG2hqJu4pgSTnC/zRlaug4w=; b=JhlZgP33ajrhTOYrM5OBROSnZL
cVEvshNMD6oGZjx0nZ42o5vuQ5jlBU4etY/+J4AgolRi70b7kmkFVHoo3I5zQL/5nxa6c6C2xs03K
cz7m2WmKWbf2jeMGfXCwm3YK/h+5v8mUeUV0y5dZq6iPRq0hB68/O4YMrv6WYHh+NsgsaUm0ELZ8l
F40q2qR9hix7ReDsnG5ZBQnQ3QJ+BUDXEcN+Cql8lFq+5zsm40cNjr5e2DWOeuFpggImcUb9/prYA
/TeNu8iyXqqLN2rVLDLYiCV9eKSfQr3lxpHaZJ8hCH8p2w5L5w9GtZICPpxn0rG0TDNKGoV2TE18i
ajJ5ooiQ==;
Received: from authenticated user by zero.zsh.org with local
id 1ntnho-0003dO-02;
Wed, 25 May 2022 09:53:28 +0000
Authentication-Results: zsh.org;
iprev=pass (smtpq1.tb.ukmail.iss.as9143.net) smtp.remote-ip=212.54.57.96;
dkim=pass header.d=ntlworld.com header.s=meg.feb2017 header.a=rsa-sha256;
dmarc=pass header.from=ntlworld.com;
arc=none
Received: from smtpq1.tb.ukmail.iss.as9143.net ([212.54.57.96]:56836)
by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256)
id 1ntnhT-0003JW-4m;
Wed, 25 May 2022 09:53:08 +0000
Received: from [212.54.57.82] (helo=smtp3.tb.ukmail.iss.as9143.net)
by smtpq1.tb.ukmail.iss.as9143.net with esmtp (Exim 4.90_1)
(envelope-from
)
id 1ntnhS-0005yp-V5
for zsh-workers@zsh.org; Wed, 25 May 2022 11:53:06 +0200
Received: from oxbe13.tb.ukmail.iss.as9143.net ([172.25.160.144])
by smtp3.tb.ukmail.iss.as9143.net with ESMTP
id tnhSnoWehmkHatnhSn1PgU; Wed, 25 May 2022 11:53:06 +0200
X-Env-Mailfrom: p.w.stephenson@ntlworld.com
X-Env-Rcptto: zsh-workers@zsh.org
X-SourceIP: 172.25.160.144
X-CNFS-Analysis: v=2.4 cv=OYGLszfY c=1 sm=1 tr=0 ts=628dfc82 cx=a_exe
a=wuFMYA7voKp1dZz7Z+vj5Q==:117 a=wbvTLvLwOfMA:10 a=IkcTkHD0fZMA:10
a=7H6ixmLU1AQA:10 a=NLZqzBF-AAAA:8 a=i3_X4zI8AAAA:8 a=akhSDD22mFiVuS_kdEsA:9
a=QEXdDO2ut3YA:10 a=wW_WBVUImv98JQXhvVPZ:22 a=8oTDZq07e2cfE5SwPOkS: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=1653472386;
bh=VUtMfq3Ctiwde3xrzAZMJ7gHxWmobnnFOwXgQbd2PiY=;
h=Date:From:To:In-Reply-To:References:Subject;
b=hjTnX/wppFeOKicAWXEFvpJrQ4ZQoSa4bwHJHx9ELHQ6FOOxq3NtDCL5F8rBzb6gv
AGkP9bc7FE/aCU03yFfr3qbLmTLuhO2kQNXqzn20J7yiHeqAWD3o0WjIOB4M6Gb4kG
lwd/OsEdtVXj2Xt6kYcSVPiEa5T583cJidCC97Xd/IVE3HH54GjLHX9ZZFGLhDBYsw
dyrAZzQBbfG+/bwhdzo5QtQfsFLPAloXHu1KAlculI394ZEB3stlBgbhognTYxK3Ur
eXQRfGCZtwEoxkz11iUw8B6O0EQv4CkDqq5huCcSbfKHdUBG73qg8D+sv+034bOJRH
sFYwA9s4wK4hA==
Date: Wed, 25 May 2022 10:53:06 +0100 (BST)
From: Peter Stephenson
To: Stefan Radziuk , zsh-workers@zsh.org
Message-ID: <1126442111.366927.1653472386462@mail2.virginmedia.com>
In-Reply-To: <200084252.242457.1653041722599@mail2.virginmedia.com>
References:
<200084252.242457.1653041722599@mail2.virginmedia.com>
Subject: Re: Using the history expansion modifier 'a' results in excessive
lstat calls
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: 147.161.167.85
X-Originating-Client: open-xchange-appsuite
X-CMAE-Envelope: MS4xfKl0BOoDEJx6ziY+wkdJ80QKK2kAHrt7JpeEqirq8hxvOTLcp8raWGV0IJZuPn9XskqaG8tHk0vTbdyFO6AlBuKBqIZ2ARinUrkh7w+9mb5fMpbyISss
0prHneQiyWIg/U+zUqkkdn8/E7Au/SPn5XG0J3mywcVb1Om9umg30vUzhWPKc4XDEG9V6w78jH38LJD3cmaNWU9PJCDgfQkC5JY7OdU7O4qS9dH+wzz3TmB3
9+auG05GqoqN+YSJNomn6ZaW0ITE9a6ervYI8AXUCUs=
X-Seq: 50287
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 20 May 2022 at 11:15 Peter Stephenson wrote:
> On 20 May 2022 at 11:08 Stefan Radziuk wrote:
> > I have looked through some threads in the mailing list to find out why
> > zgetdir > is being used over getcwd in the first place. It seems it was
> > implemented this way in the 1990s to work around a bug in some implementations
> > of getcwd, which should not be a concern on modern systems.
> >
> > I was wondering if zgetdir is still the right way to do this? Are there
> > use cases where it is preferred over getcwd? Maybe zgetcwd could simply
> > use getcwd primarily (i.e. not as fallback), or perhaps USE_GETCWD could
> > be enabled by default (currently it is only enabled on QNX builds).
>
> The best bet would probably be to try that by default once we're sure the
> release is out of the way --- as you say there's a good chance that's the
> right way to go now and I don't think we're going to find out the problems
> any other way.
Will it be worth seeing what effects the following has?
pws
diff --git a/configure.ac b/configure.ac
index c72148d06..77e381f50 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2021,11 +2021,15 @@ if test x$zsh_cv_sys_superroot = xyes; then
fi
dnl CHECK FOR SYSTEMS REQUIRING GETCWD
+dnl This is now turned on by default, as we expect modern getcwd
+dnl implementations to work correctly. Any exceptions should be added
+dnl to the first case. Currently there are none, hence it is forced
+dnl not to match.
AC_CACHE_CHECK(whether we should use the native getcwd,
zsh_cv_use_getcwd,
[case "${host_cpu}-${host_vendor}-${host_os}" in
- *QNX*) zsh_cv_use_getcwd=yes ;;
- *) zsh_cv_use_getcwd=no ;;
+ *NOMATCH*) zsh_cv_use_getcwd=no ;;
+ *) zsh_cv_use_getcwd=yes ;;
esac])
AH_TEMPLATE([USE_GETCWD],
[Define to 1 if you need to use the native getcwd.])