Subject: Re: /proc + Linux emul: "exe" is no symlink
To: None <tech-kern@NetBSD.org>
From: Ingbert Meyer <info@meyer-datasystems.de>
List: tech-kern
Date: 10/25/2006 09:26:23
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?
> Or is there a good reason not to follow Linux (in Linux emul!) here?
>
> FWIW, this was tested with Linux rfhinf090 2.6.8-24.23-smp #1 SMP Thu 
> Jun 8 13:31:34 UTC 2006 i686 i686 i386 GNU/Linux and NetBSD 
> 4.0_NETA/i386.
>
> Some background: apparently there are commercial (proprietary) 
> database/ERP systems for Linux that check for that symlink, and abort 
> if it's  not there. (I sure don't want to know the details, but fixing 
> our emulation seems worthwhile to me :-)
>
> Anyone got a patch?
>
>
>  - Hubert
The database system is  the Advantage Database Server , made by 
iAnywhere/Sybase. There is  a test version available at 
http://www.advantagedatabase.com/web/content.aspx?key=4290F5759B1F5D69F34AD94713D236EF.

As far as I could trace it, the server reads the symlink on startup  to 
learn the path to its installation directory.

 I think, its getting a popular   practice  for linux programmers, to 
use /proc,  and so NetBSD's  linux emulation /proc must be as close as 
possible to the 'original' to keep it working .

I.  Meyer