Re: getting pathname from descriptor

From: Casper H.S. Dik (Casper.Dik_at_Sun.COM)
Date: 05/30/05


Date: 30 May 2005 14:29:35 GMT


"Kamal R. Prasad" <kamalp@acm.org> writes:

>I believe the OS ought to store the pathname which was passed to
>open() to get the fd (if it cannot provide the user with access to the
>namecache).

That's hardly sufficient; files get renamed, files get opened relative
to the current working directory, etc.

Both Solaris 10 and Linux do some form of bookkeeping to be able to
recover the pathnamem of a file.

Casper

-- 
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

Quantcast