Chet, on Solaris the /devices filesystem does not support extended attributes (O_XATTR), yet cd -@ returns 0 (success):
./bash -c 'cd -@ /devices 2>/dev/null; echo $?' 0 ~/bin/ksh -c 'cd -@ /devices 2>/dev/null; echo $?' 1 truss shows that bash gets errno==EINVAL but then uses chdir("/devices") instead of returning the error: stat64("/devices", 0x08047520) = 0 open64("/devices", O_RDONLY|O_NONBLOCK) = 3 openat64(3, ".", O_RDONLY|O_XATTR) Err#22 EINVAL close(3) = 0 chdir("/devices") = 0 brk(0x0819C000) = 0 Josh ---------- Forwarded message ---------- From: Lionel Cons <lionelcons1...@gmail.com> Date: Tue, Nov 5, 2013 at 11:12 PM Subject: Re: Bash-4.3-beta2 available for FTP To: Chester Ramey <chet.ra...@case.edu> Cc: Simon Toedt <simon.to...@gmail.com>, bug-bash@gnu.org, Joshuah Hurst <joshhu...@gmail.com>, Cedric Blancher <cedric.blanc...@gmail.com>, Chester Ramey <c...@po.cwru.edu> On 5 November 2013 22:56, Chet Ramey <chet.ra...@case.edu> wrote: >> > I'm interested in the patch if cd -@ file works like in ksh. Or >> > whatever, just send the patch that I can test it. >> > >> > Thank you. >> >> Again. Any patch or git pull tarball which we could try? > > The cd -@ option is available in the `devel' branch of the git tree on > savannah: > > http://git.savannah.gnu.org/cgit/bash.git/?h=devel > > It first appears in the bash-20131025 snapshot. Chet, thank you Build instructions: git clone --branch devel git://git.savannah.gnu.org/bash.git Apply this patch and then build as usual: diff --git a/builtins/cd.def b/builtins/cd.def index 498cf88..c448c5a 100644 --- a/builtins/cd.def +++ b/builtins/cd.def @@ -194,7 +194,7 @@ cdxattr (dir, ndirp) { #if defined (O_XATTR) int apfd, fd, r, e; - char buf[11+40+40]; /* construct new `fake' path for pwd */ + char buff[11+40+40]; /* construct new `fake' path for pwd */ apfd = openat (AT_FDCWD, dir, O_RDONLY|O_NONBLOCK); if (apfd < 0) Lionel -- Josh