At least two projects are blocked on FreeBSD due to inability of such lookup: 1. sysutils/watchman 2. The USD project: https://github.com/PixarAnimationStudios/USD/blob/release/pxr/base/arch/fileSystem.cpp#L470 This was discussed in hackers@ around July 2021. It would be beneficial if sysctl or fcntl would be able to return a list of file paths for a given file descriptor. This list of paths can be empty when the file is deleted, or it can have multiple paths when the file is hard-linked. Yuri
Wine's file change notifications would also benefit from this (https://source.winehq.org/patches/data/221384). In that patch I've used sysctl with CTL_KERN + KERN_PROC + KERN_PROC_FILEDESC + pid, but frequent linear searches for each file descriptor are going to be slow.