CentOS 7.0 - man page for tcl_getnameofexecutable (centos section 3)
|Linux & Unix Commands - Search Man Pages
Tcl_FindExecutable(3) Tcl Library Procedures Tcl_FindExecutable(3)
Tcl_FindExecutable, Tcl_GetNameOfExecutable - identify or return the name of the binary
file containing the application
const char *
char *argv0 (in) The first command-line argument to the program, which gives the
The Tcl_FindExecutable procedure computes the full path name of the executable file from
which the application was invoked and saves it for Tcl's internal use. The executable's
path name is needed for several purposes in Tcl. For example, it is needed on some plat-
forms in the implementation of the load command. It is also returned by the info name-
On UNIX platforms this procedure is typically invoked as the very first thing in the
application's main program; it must be passed argv as its argument. It is important
not to change the working directory before the invocation. Tcl_FindExecutable uses argv0
along with the PATH environment variable to find the application's executable, if possi-
ble. If it fails to find the binary, then future calls to info nameofexecutable will
return an empty string.
Tcl_GetNameOfExecutable simply returns a pointer to the internal full path name of the
executable file as computed by Tcl_FindExecutable. This procedure call is the C API
equivalent to the info nameofexecutable command. NULL is returned if the internal full
path name has not been computed or unknown.
binary, executable file
Tcl 8.1 Tcl_FindExecutable(3)
All times are GMT -4. The time now is 04:32 PM.