The getexecname() function returns the pathname (the first argument of one of the exec family of functions; see exec(2)) of the executable that started the process.
Normally this is an absolute pathname, as the majority of commands are executed by the shells that append the command name to the user's PATH components. If this is not an absolute
path, the output of getcwd(3C) can be prepended to it to create an absolute path, unless
the process or one of its ancestors has changed its root directory or current working directory since the last successful call to one of the exec family of functions.
|