On 27 September 2013 10:24, Glenn Fowler <[email protected]> wrote: > > On Fri, 27 Sep 2013 08:12:22 +0200 Roland Mainz wrote: >> On Fri, Sep 27, 2013 at 7:53 AM, Roland Mainz <[email protected]> >> wrote: >> > On Fri, Sep 27, 2013 at 7:24 AM, Roland Mainz <[email protected]> >> > wrote: >> >> On Fri, Sep 27, 2013 at 6:48 AM, Roland Mainz <[email protected]> >> >> wrote: >> >>> On Fri, Sep 27, 2013 at 6:17 AM, Glenn Fowler <[email protected]> >> >>> wrote: >> >>>> On Fri, 27 Sep 2013 04:17:31 +0200 Roland Mainz wrote: >> >>>>> On Fri, Sep 27, 2013 at 3:50 AM, Roland Mainz >> >>>>> <[email protected]> wrote: >> >>>>> > The following code from one of my test scripts no longer work in >> >>>>> > ast-ksh.2013-09-26 on Solaris 11/AMD64/64bit: >> >>>>> > -- snip -- >> >>>>> > $ ksh -c 'redirect {n}<. ; redirect >> >>>>> > {m}</dev/file/flags@xattr@/dev/fd/$n ' >> >>>>> > /home/test001/bin/ksh: /dev/file/flags@xattr@/dev/fd/11: cannot open >> >>>>> > [Invalid argument] >> >>>>> > -- snip -- >> [snip] >> > So basically we're back the point where the whole code within |#if >> > O_XATTR| doesn't work... and shouldn't be used because the >> > implementations will perform horribly performance-wise. > >> Erm... question: >> What is wrong with the following patch to fix the original problem >> that $ ksh -c 'redirect {n}<. ; redirect >> {m}</dev/file/flags@xattr@/dev/fd/$n ; cd -f $m ; ls;true' # doesn't >> work: >> -- snip -- >> diff -r -u original/src/lib/libast/path/pathopen.c >> build_i386_64bit_debug/src/lib/libast/path/pathopen.c >> --- src/lib/libast/path/pathopen.c 2013-08-29 07:17:52.000000000 +0200 >> +++ src/lib/libast/path/pathopen.c 2013-09-27 08:03:03.149006810 +0200 >> @@ -222,7 +222,7 @@ > >> /* preserve open() semantics if possible */ > >> - if (oflags & (O_DIRECTORY|O_SEARCH)) >> + if (oflags & (O_DIRECTORY|O_SEARCH|O_XATTR)) >> return openat(dev.fd, ".", >> oflags|O_INTERCEPT, mode); >> #if O_XATTR >> if ((f = openat(dev.fd, ".", >> O_INTERCEPT|O_RDONLY|O_XATTR)) >= 0) >> -- snip -- > > that looks good but will require this at the top of the file > > #ifndef O_XATTR > #define O_XATTR 0 > #endif > >> Looking at the output of "truss" it seems to do exactly what's >> requested at shell code level... > > there's path corruption somewhere -- more on that later today
Both Glenn and Roland: Do me a favour and don't break cd -@, do you? We depend on that feature on production systems, and if you break it I get nailed by the board of directors. Ced -- Cedric Blancher <[email protected]> Institute Pasteur _______________________________________________ ast-developers mailing list [email protected] http://lists.research.att.com/mailman/listinfo/ast-developers
