Subject: Re: code to store the path of the executable in struct proc...
To: Christos Zoulas <>
From: Matt Thomas <>
List: tech-kern
Date: 09/20/2007 14:10:11
On Sep 20, 2007, at 2:01 PM, Christos Zoulas wrote:

> In order to properly implement ld.elf_so $ORIGIN and the procfs
> "exe" symlink we need to know the path to an executable. The
> following code does this, but it is not particularly efficient and
> its use of vnode_to_path() is questionable.
> Comments?

What happens if you move the executable (or a parent directory of it)?
(ignoring the fact if you use a remote file system, that could happen
without you being able to compensate for it.)

It probably makes more sense to store the file handle of the executable
and the directory it's in instead of the path.