On Wed, Aug 14, 2013 at 9:37 PM, Glenn Fowler <[email protected]> wrote:
>
> On Wed, 14 Aug 2013 15:36:26 -0400 Glenn Fowler wrote:
>> On Wed, 14 Aug 2013 21:29:50 +0200 Irek Szczesniak wrote:
>> > On Wed, Aug 14, 2013 at 8:18 PM, Glenn Fowler <[email protected]> 
>> > wrote:
>> > >
>> > > invalid assumption that if this works
>> > >         open("/proc/self/fd/<DIRFD>/.")
>> > > then other pathname calls will too
>> > > and this is then used to emulate missing *at() calls
>
>> > Curse SUN and its half baked innovations.
>> > if anyone of you have a patch send it to me or the list, please
>
>> yes
>
> yes to the curse

How did you fix this for ast-ksh.2013-08-14? First I thought the code
is clever and extracts the fd number from /proc/self/fd/<DIRFD>/ but
then I found it just uses open() toopen /proc/self/fd/<DIRFD>/ and
pass that to mkdirat(), which is a waste of good syscalls and doesn't
work:
ksh -c '/usr/bin/rm -Rf t1 ; mkdir t1 ; redirect {n}<t1 ; chmod a-r t1
; mkdir /proc/$$/fd/$n/t2 ; true'
mkdir: /proc/645/fd/11/t2: [Permission denied]

I would fix it myself but can't find the place which converts the
/proc/$$/fd/$n/$path to a <fd>,<path> pair as it should be.

Irek
_______________________________________________
ast-developers mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-developers

Reply via email to