Tcl Library Procedures
NAME
Tcl_FindExecutable - identify the binary file containing the application
SYNOPSIS
#include <tcl.h>
char *
Tcl_FindExecutable(argv0)
ARGUMENTS
-
char *argv0 (in)
-
The first command-line argument to the program, which gives the
application's name.
DESCRIPTION
This 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 platforms in the
implementation of the load command.
It is also returned by the info nameofexecutable command.
On UNIX platforms this procedure is typically invoked as the very
first thing in the application's main program; it must be passed
argv[0] 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.
KEYWORDS
binary, executable file
Last change: 7.5
[ tcl8.0a1 | tk8.0a1 | X-ref ]
Copyright © 1989-1994 The Regents of the University of California.
Copyright © 1994-1996 Sun Microsystems, Inc.