From: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
To: Linux filesystem development <linux-fsdevel@vger.kernel.org>
Subject: [QnA] procfs: How to read the unresolved location of an executable?
Date: Fri, 19 Sep 2025 13:21:00 -0300 [thread overview]
Message-ID: <3300604.5fSG56mABF@tx3000mach.io> (raw)
I have an MWE with a combined multi utils executable like BusyBox. I know I
can use the arguments passed to deduct which name the executable was invoked
with.
$ ln -s multi example
$ ./example # example should show in argv
I want to do the same with procfs but if I use `/proc/self/exe` it points out
to the full path of multi instead of example's. Is there a way to know the
location of example with procfs? My intention is to use this location with
frameworks like Electron to find resource paths relative to the one of the
invoking executable.
Your answers are thanked in advance.
reply other threads:[~2025-09-19 16:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3300604.5fSG56mABF@tx3000mach.io \
--to=yakoyoku@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).