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,
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, whi
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,
> +
Eric Blake wrote:
> open/access/close is cheaper than open/stat/stat/close.
>
> * lib/openat-proc.c (openat_proc_name): Simplify.
> * modules/openat (Depends-on): Drop same-inode.
> Reported by Bastien ROUCARIES.
...
> diff --git a/lib/openat-proc.c b/lib/openat-proc.c
...
> @@ -80,15 +79,9 @@ open
On 05/09/2011 05:15 PM, Bruno Haible wrote:
> Eric Blake wrote:
>> - int proc_self_fd = open ("/proc/self/fd", O_SEARCH);
>> + int proc_self_fd = open ("/proc/self/fd",
>> + O_SEARCH | O_DIRECTORY | O_NOCTTY |
>> O_NONBLOCK);
>
> What is the point of playin
Eric Blake wrote:
> - int proc_self_fd = open ("/proc/self/fd", O_SEARCH);
> + int proc_self_fd = open ("/proc/self/fd",
> + O_SEARCH | O_DIRECTORY | O_NOCTTY |
> O_NONBLOCK);
What is the point of playing with O_NOCTTY and O_NONBLOCK here?
It could trigger
On 05/09/2011 04:37 PM, Eric Blake wrote:
> open/access/close is cheaper than open/stat/stat/close.
>
> * lib/openat-proc.c (openat_proc_name): Simplify.
> * modules/openat (Depends-on): Drop same-inode.
> Reported by Bastien ROUCARIES.
>
> Signed-off-by: Eric Blake
> ---
>
> I'm pushing this.
open/access/close is cheaper than open/stat/stat/close.
* lib/openat-proc.c (openat_proc_name): Simplify.
* modules/openat (Depends-on): Drop same-inode.
Reported by Bastien ROUCARIES.
Signed-off-by: Eric Blake
---
I'm pushing this.
ChangeLog |7 +++
lib/openat-proc.c | 13 +