[Bug 248184] readlink("/proc/curproc/file" returns random results

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Jul 22 16:53:27 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248184

            Bug ID: 248184
           Summary: readlink("/proc/curproc/file" returns random results
           Product: Base System
           Version: 12.1-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs at FreeBSD.org
          Reporter: Joerg.Schilling at fokus.fraunhofer.de

The expected returned string is the first argument to the exec*() call, but it
returns a random hardlink to that file instead.

This prevents it from being used to detect how a program has been called and to
select the dedicated behavior from a fat binary, that e.g. implements both
POSIX and non-POSIX behavior.

I came over that problem when calling the parallel version of SunPro Make as:

/opt/schily/bin/dmake

and readlink(/porc/curproc/file) returned /opt/schily/xpg4/bin/make

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list