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. Tcl_FindExecutable uses argv0 along with the PATH environment variable to find the application's executable, if possible. 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.
Copyright © 1995-1996 Sun Microsystems, Inc. Copyright © 1995-1997 Roger E. Critchlow Jr.