Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

getexecname(3c) [suse man page]

getexecname(3C) 					   Standard C Library Functions 					   getexecname(3C)

NAME
getexecname - return pathname of executable SYNOPSIS
#include <stdlib.h> const char *getexecname(void); DESCRIPTION
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. RETURN VALUES
If successful, getexecname() returns a pointer to the executables pathname; otherwise, it returns 0. USAGE
The getexecname() function obtains the executable pathname from the AT_SUN_EXECNAME aux vector. These vectors are made available to dynam- ically linked processes only. A successful call to one of the exec family of functions will always have AT_SUN_EXECNAME in the aux vector. The associated pathname is guaranteed to be less than or equal to PATH_MAX, not counting the trailing null byte that is always present. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |Safe | +-----------------------------+-----------------------------+ SEE ALSO
exec(2), getcwd(3C), attributes(5) SunOS 5.10 17 Dec 1997 getexecname(3C)

Check Out this Related Man Page

getexecname(3C)                                            Standard C Library Functions                                            getexecname(3C)

NAME
getexecname - return pathname of executable SYNOPSIS
#include <stdlib.h> const char *getexecname(void); DESCRIPTION
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. RETURN VALUES
If successful, getexecname() returns a pointer to the executables pathname; otherwise, it returns 0. USAGE
The getexecname() function obtains the executable pathname from the AT_SUN_EXECNAME aux vector. These vectors are made available to dynam- ically linked processes only. A successful call to one of the exec family of functions will always have AT_SUN_EXECNAME in the aux vector. The associated pathname is guaranteed to be less than or equal to PATH_MAX, not counting the trailing null byte that is always present. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |Safe | +-----------------------------+-----------------------------+ SEE ALSO
exec(2), getcwd(3C), attributes(5) SunOS 5.10 17 Dec 1997 getexecname(3C)
Man Page