bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] openat: reduce syscalls in first probe of /proc


From: Jim Meyering
Subject: Re: [PATCH] openat: reduce syscalls in first probe of /proc
Date: Tue, 10 May 2011 11:43:20 +0200

Jim Meyering wrote:

> Bastien ROUCARIES wrote:
>
>> I disagree here:
>>>       else
>>>         {
>>> +          /* Detect whether /proc/self/fd/../fd exists.  On Linux, that 
>>> name
>>> +             resolves to /proc/self/fd, which was opened above.  However, 
>>> on
>>> +             Solaris, it may resolve to /proc/self/fd/fd, which cannot 
>>> exist,
>>> +             since all names in /proc/self/fd are numeric.  */
>>
>> Will be better
>>     /* Detect whether /proc/self/fd/%i/../fd exists.  Where %i is an
>> open fd on /proc/self/fd.
>>        On Linux, that name
>>        resolves to /proc/self/fd, which was opened above.  However, on
>>        Solaris, it may resolve to /proc/self/fd/fd, which cannot exist,
>>        since all names in /proc/self/fd are numeric.  */
>
> Thanks for catching that.
> I've tweaked it slightly.  Since it's in your name,
> I'll wait until you ACK before pushing:

Bastien ACK'd privately, so I've pushed that.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]