Re: Get actual _full_ name of current executable, not via argv[0] on Linux



Grant Edwards <invalid@invalid> writes:

On 2009-07-14, Grant Edwards <invalid@invalid> wrote:
On 2009-07-14, Rainer Weikusat <rweikusat@xxxxxxxxxxx> wrote:
Alex Vinokur <alexvn@xxxxxxxxxxxxxxxxxxxxx> writes:

Is there any way to get actual _full_ name of current executable,

You can try reading the /proc/self/exe-symlink. But a file can
have many different names on a filesystem with hard link
support, so this may or may not help.

The executable may also have zero names. :)

OT: Did you ever wonder why in English the word "zero" is
treated as plural?

"zero names" "one name" "two names" "three names"
^ ^ ^

Is it that way in other languages?

It is that way in Swedish.

--
Måns Rullgård
mans@xxxxxxxxx
.



Relevant Pages