Subject: Re: /proc/${pid}/exe not working
To: Antti Kantee , Alan Barrett <>
From: Bill Studenmund <>
List: current-users
Date: 02/26/2007 11:56:04
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).
> 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).
> 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=
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,


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

Version: GnuPG v1.4.3 (NetBSD)