/exe is not a symbolic link
To: None <gnats-bugs@gnats.netbsd.org>
From: None <kent@netbsd.org>
List: netbsd-bugs
Date: 11/28/2001 00:37:51
>Number: 14756
>Category: kern
>Synopsis: /proc/<pid>/exe is not a symbolic link
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Nov 28 00:38:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: TAMURA Kent
>Release: NetBSD 20011108-1.5Y snapshot
>Organization:
>Environment:
NetBSD gabi-n.hauN.org 1.5Y NetBSD 1.5Y (GABI-N) #7: Fri Nov 23 16:26:58 JST 2001 kent@lets:/home0/netbsd/src/sys/arch/i386/compile/GABI-N i386
>Description:
On NetBSD with procfs enabled the linux option, /proc/<pid>/exe is
NOT a symbolic link to an executable file though it is a symbolic
link on Linux.
readlink("/proc/self/exe",...) is sometimes used as a way to get
a real path of executable file itself.
>How-To-Repeat:
NetBSD:
# mount -t procfs -o linux /proc /proc
# /bin/ls -l /proc/self/exe
-r-xr-xr-x 1 root wheel 288992 Nov 8 16:52 /proc/self/exe
RedHat Linux (kernel 2.2.17):
# /bin/ls -l /proc/self/exe
lrwx------ 1 kent hauN 0 Nov 28 17:34 /proc/self/exe -> /bin/ls
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: