Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Nov 2007 11:33:38 -0800
From:      Yuri <yuri@rawbw.com>
To:        freebsd-hackers@freebsd.org
Subject:   How to get filename of an open file descriptor
Message-ID:  <1194896018.4738aa922f776@webmail.rawbw.com>

next in thread | raw e-mail | index | archive | help
I am looking for functionality similar to Linux's /proc/<PID>/fd/<FD>.
I need to know what is the file name of an open file descriptor.

/proc/<PID>/fd is missing on FreeBSD.

There's something called 'fdescfs'. In /dev/fd/ it shows the list of file
descriptors. But they don't seem to be symbolic links to open files. And also it
only shows FDs of the current process.

So why there's no /proc/<PID>/fd in FreeBSD?
And how do I work around this?
Or should I just invest time and write a kernel patch implementing /proc/<PID>/fd/?

Yuri



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1194896018.4738aa922f776>