Subject: Re: /proc/${pid}/exe not working
To: Antti Kantee , Alan Barrett <apb@cequrux.com>
From: Bill Studenmund <wrstuden@netbsd.org>
List: current-users
Date: 02/26/2007 11:56:04
--5vNYLRcllDrimb99
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Feb 24, 2007 at 09:47:23PM +0200, Antti Kantee wrote:
> On Sat Feb 24 2007 at 21:24:44 +0200, Alan Barrett wrote:
> >=20
> > What confuses me is that /proc/${pid}/cwd does not suffer from the
> > problem, although the code paths in procfs_vnops.c for PFScwd and PFSexe
> > are so similar.  Anyway, I raised a PR (number 35830).
>=20
> That's because cwd can do real getcwd if the entry is not found in the
> cache - directories always have a unique parent.  Other types of file
> system nodes, however, lack this luxury (think hardlinks).
>=20
> As a hack to fix a hack, maybe we can add layerfs support the name cache?
> What do people think?

How would layerfs help? getcwd falls back on looking up ".." in a dir, and=
=20
that will fall through to the lower fs, which will find it in the cache.

Being able to enumerate parents of a hard link is what we'd need, and is=20
something that would need coordination with all other ffs systems (so it=20
would keep up to date).

Take care,

Bill

--5vNYLRcllDrimb99
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (NetBSD)

iD8DBQFF4ztUWz+3JHUci9cRAgUrAJ0RI2KvuCee2OnZBv6wIaXFTeySHwCeN9iT
xh/hB1b7NoQ3GqkX7p571vA=
=Kylc
-----END PGP SIGNATURE-----

--5vNYLRcllDrimb99--