On 11/7/13 6:21 AM, Simon Toedt wrote:
> On Tue, Nov 5, 2013 at 10:56 PM, 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.
> 
> Thank you. But, it does not build. Is that a known problem?

Yes.  There are a few issues with the bash-20131025 snapshot.  I've
attached a patch that fixes them.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/
*** ../bash-20131025/builtins/cd.def    2013-10-20 22:09:22.000000000 -0400
--- builtins/cd.def     2013-11-06 18:04:24.000000000 -0500
***************
*** 217,223 ****
       path valid, we need to keep the file descriptor open as long as we are in
       this directory.  This imposes a certain structure on /proc. */
-   sprintf (buff, "/proc/%d/fd/%d", getpid(), fd);
    if (ndirp)
!    *ndirp = savestring (buff);
  
    if (xattrfd >= 0)
--- 217,225 ----
       path valid, we need to keep the file descriptor open as long as we are in
       this directory.  This imposes a certain structure on /proc. */
    if (ndirp)
!     {
!       sprintf (buf, "/proc/%d/fd/%d", getpid(), fd);
!       *ndirp = savestring (buf);
!     }
  
    if (xattrfd >= 0)
***************
*** 272,275 ****
--- 274,278 ----
    eflag = 0;
    no_symlinks = no_symbolic_links;
+   xattrflag = 0;
    reset_internal_getopt ();
  #if defined (O_XATTR)
***************
*** 589,592 ****
--- 592,602 ----
          tdir = ndir;
        }
+       else
+       {
+         err = errno;
+         free (tdir);
+         errno = err;
+         return (0);           /* no xattr */
+       }
      }
    else

Reply via email to