Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Jul 2020 14:57:04 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 248184] readlink("/proc/curproc/file") returns arbitrary correct name for programs with more than one link (name)
Message-ID:  <bug-248184-227-CiMpgDPc99@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-248184-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-248184-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D248184

Ed Maste <emaste@freebsd.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |emaste@freebsd.org

--- Comment #3 from Ed Maste <emaste@freebsd.org> ---
>From the man page:

    #include <stdlib.h>
    const char *getexecname(void);

    ...

    If successful, getexecname() returns a pointer to the executables pathn=
ame;
otherwise, it returns 0.

    ...

    The getexecname() function obtains the executable pathname from the
AT_SUN_EXECNAME aux vector. These vectors are made available to dynamically
linked processes only.

It seems like we could also add getexecname as a slightly more convenient
interface than elf_aux_info.

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-248184-227-CiMpgDPc99>