Take a look at the source for 'lsof' -- you might find some help there.
Based on observed behaviour, there's usually an open file descriptor
that points to the binary that's being executed.

Not a *nix internals guru,

-dan.

On Wed, 5 Mar 2003, Ferguson, Neale wrote:

> How do I, within a program, get the full pathname of the program I'm
> executing? argv[0] will have the command name but not necessarily the full
> pathname.
>

Reply via email to