Subject: Re: /proc + Linux emul: "exe" is no symlink
To: None <tech-kern@NetBSD.org>
From: Alan Barrett <apb@cequrux.com>
List: tech-kern
Date: 10/25/2006 10:47:29
On Tue, 24 Oct 2006, Christos Zoulas wrote:
> >Linux:
> >   rfhinf090% dir /proc/$$/exe
> >   lrwxrwxrwx  1 feyrer bedienst 0 Oct 25 00:31 /proc/19364/exe -> /bin/tcsh
> >
> >NetBSD:
> >   noon% dir /emul/linux/proc/$$/exe
> >   -r-xr-xr-x  1 root  wheel  298032 Aug 11 02:09 /emul/linux/proc/13537/exe

> What we do is actually better because if the executable is removed ours
> will still work. But we could have two entries I guess for this; one
> a symlink and the other the real inode.

We already have two entries: /proc/${pid}/file is the native one, and
/proc/${pid}/exe is the linux-compat one.  Changing "exe" to a symlink
while keeping "file" as something a lot like a hard link seems sensible
to me.

--apb (Alan Barrett)