Subject: /proc + Linux emul: "exe" is no symlink
To: None <>
From: Hubert Feyrer <>
List: tech-kern
Date: 10/25/2006 00:36:54
Linux' /proc/$$/exe is a symlink while it' a regular file on NetBSD's 
procfs (mounted with -o linux).

   rfhinf090% dir /proc/$$/exe
   lrwxrwxrwx  1 feyrer bedienst 0 Oct 25 00:31 /proc/19364/exe -> /bin/tcsh

   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