Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Jul 2020 19:22:10 +0200
From:      Mateusz Guzik <mjguzik@gmail.com>
To:        Yuri <yuri@rawbw.com>
Cc:        Freebsd hackers list <freebsd-hackers@freebsd.org>
Subject:   Re: Is it possible to determine the open file path based on the file descriptor?
Message-ID:  <CAGudoHHpaKEo9ZfHEGrRgLE6RknM_KbmN1B5cx2%2B6jNsDzgY1A@mail.gmail.com>
In-Reply-To: <5a00f93e-21a1-47ab-6e8e-15d24840c525@rawbw.com>
References:  <21b0280d-c290-f27f-98a9-0c2242380718@rawbw.com> <CAGudoHEjFvt4nijEUj0FwN0CTYmuxuqvSbiMefTeMvrXeuEkJg@mail.gmail.com> <CAGudoHHE7UcNsT5hB8zRwhjABBCP2-rtFcuHE=dhmPwvf=6XgA@mail.gmail.com> <5a00f93e-21a1-47ab-6e8e-15d24840c525@rawbw.com>

next in thread | previous in thread | raw e-mail | index | archive | help
llvm is an example reason why I'm reluctant to add this. llvm
currently will perform realpath, which was converted to a syscall and
with other upcoming changed will be quite cheap, but most importantly
reliable. F_GETPATH can easily fail which makes me really wary of this
without always adding names to the namecache.

On 7/8/20, Yuri <yuri@rawbw.com> wrote:
> On 2020-07-08 09:59, Mateusz Guzik wrote:
>> I can't be arsed to find all the proper headers, but you get the idea.
>> If this makes the program work well enough I can commit and merge to
>> stable/12.
>
>
> This particular project (watchman) looks for F_GETPATH and fails because
> it isn't defined. If you would add it to 12.1 this would be great.
>
> llvm sources also contain references to F_GETPATH.
>
>
> Thank you,
>
> Yuri
>
>
>


-- 
Mateusz Guzik <mjguzik gmail.com>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGudoHHpaKEo9ZfHEGrRgLE6RknM_KbmN1B5cx2%2B6jNsDzgY1A>