Subject: Re: /proc + Linux emul: "exe" is no symlink
To: Hubert Feyrer <hubert@feyrer.de>
From: Thor Lancelot Simon <tls@rek.tjls.com>
List: tech-kern
Date: 10/25/2006 13:17:49
On Wed, Oct 25, 2006 at 12:36:54AM +0200, Hubert Feyrer wrote:
>
> Linux' /proc/$$/exe is a symlink while it' a regular file on NetBSD's
> procfs (mounted with -o linux).
>
> 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
>
> How hard would it be to fix our procfs to have the 'exe' entry as symlink?
It's bogus -- it requires a vnode-to-name translation that is not always
possible, and, when it is, requires the storage of a great deal of extra
information in a frequently accessed datastructure in the kernel.
Thor