Re: Is it possible to determine the open file path based on the file descriptor?
Date: Sun, 05 Dec 2021 17:53:23 UTC
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 Yuri