fstat and filenames

Lowell Gilbert lgusenet at be-well.ilk.org
Fri Dec 14 06:21:29 PST 2007


moonshade at pnhz.kz (Denis Eremenko) writes:

> Why fstat so secretive about file names and unix domain sockets?

With respect to file names, you need to remember that there may not be
a unique answer.  A file handle's metadata doesn't keep information
about how it was opened, just the inode.  That inode could belong to
multiple directory entries, or none -- this is why, as the fstat(1)
manual points out, "there is no mapping from an open file back to the
directory entry that was used to open that file."

As far as unix domain sockets, I don't understand the question.  Sorry.

Be well.


More information about the freebsd-fs mailing list