Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Dec 2021 20:54:36 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Yuri <yuri@rawbw.com>
Cc:        Mateusz Guzik <mjguzik@gmail.com>, 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:  <Ya0K7NelXkKtFtx%2B@kib.kiev.ua>
In-Reply-To: <656bf089-bcc9-748a-6db2-52f3707e863c@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> <CAGudoHHpaKEo9ZfHEGrRgLE6RknM_KbmN1B5cx2%2B6jNsDzgY1A@mail.gmail.com> <20200708175300.GA2866@kib.kiev.ua> <656bf089-bcc9-748a-6db2-52f3707e863c@rawbw.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Dec 05, 2021 at 09:53:23AM -0800, Yuri wrote:
> On 7/8/20 10:53, Konstantin Belousov wrote:
> > I think an immediately useful addition would be a sysctl or fcntl that
> > return struct kinfo_file for single file descriptor.
> 
> 
> There is another project that resolves file descriptors to file names:
> 
> https://github.com/PixarAnimationStudios/USD/blob/release/pxr/base/arch/fileSystem.cpp#L470
> 
> 
> Maybe it makes sense to provide a sysctl or fcntl that would return a list
> of paths for a given file descriptor?
> 
> I opened the PR for this:
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260241
> 

https://reviews.freebsd.org/D33277



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