Subject: Re: funlink() for fun!
To: NetBSD Kernel Technical Discussion List <tech-kern@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
Date: 07/14/2003 18:00:31
>> Greg, file descriptors are not associated with pathnames. There is
>> no "proper directory entry".
> How is it that suddenly you have absolutely no imagination at all?
> File descriptors are associated with files.
> Filenames are associated with files.
Yes. Therefore, a file descriptor can in principle be mapped to a set
of pathnames. (And a pathname can in principle be mapped to a set of
You are trying to add a way to go from a file descriptor to one
particular member of that set of pathnames. (And then do something
with it, but the hard part is that mapping. Depending on which message
I read, either you're willing to error out unless the set has only one
element, or you want a rather ill-defined member of the set, one
somehow related to how the file descriptor was obtained.)
This is possible to do. It is also a major philosophical shift, with
the corresponding design shift that implies. It may be an interesting
thing to consider when designing a new OS; it is of no particular value
for an existing one with an existing commitment to the present design
(and the philosophy behind it).
Hint: this list is about the latter.
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML email@example.com
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B