[PATCH] argv[0] of execvp when ENOEXEC

u-uclibc-9coy at aetey.se u-uclibc-9coy at aetey.se
Thu Aug 22 07:33:41 UTC 2013


On Wed, Aug 21, 2013 at 04:44:13PM +0000, u-uclibc-9coy at aetey.se wrote:
> Seen from another perspective, general purpose programs interpreting
> "argv[0]" are unreliable by design, as this argument is not guaranteed
> to reflect anything useful. Different caller programs (e.g. shells)

It is worth to note that a programs _can_ reliably use argv[0]
as one of the arguments - iff the program and its caller program
are developed under coordination.
Such a convention possibly existing between the caller and the callee
is beyond the library knowledge so I feel the library should not interfere
and make any assumptions about the semantics of the argv[0] argument.

Rune



More information about the uClibc mailing list