diff options
Diffstat (limited to 'doc/FindExec.3')
| -rw-r--r-- | doc/FindExec.3 | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/doc/FindExec.3 b/doc/FindExec.3 index 098c7a2..b01315c 100644 --- a/doc/FindExec.3 +++ b/doc/FindExec.3 @@ -4,10 +4,8 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: FindExec.3,v 1.3 1998/09/14 18:39:48 stanton Exp $ -'\" +.TH Tcl_FindExecutable 3 8.1 Tcl "Tcl Library Procedures" .so man.macros -.TH Tcl_FindExecutable 3 7.5 Tcl "Tcl Library Procedures" .BS .SH NAME Tcl_FindExecutable, Tcl_GetNameOfExecutable \- identify or return the name of the binary file containing the application @@ -15,13 +13,13 @@ Tcl_FindExecutable, Tcl_GetNameOfExecutable \- identify or return the name of th .nf \fB#include <tcl.h>\fR .sp -char * +void \fBTcl_FindExecutable\fR(\fIargv0\fR) .sp -CONST char * +const char * \fBTcl_GetNameOfExecutable\fR() .SH ARGUMENTS -.AS char *argv0 in +.AS char *argv0 .AP char *argv0 in The first command-line argument to the program, which gives the application's name. @@ -39,12 +37,21 @@ It is also returned by the \fBinfo nameofexecutable\fR command. .PP On UNIX platforms this procedure is typically invoked as the very first thing in the application's main program; it must be passed -\fIargv[0]\fR as its argument. \fBTcl_FindExecutable\fR uses \fIargv0\fR +\fIargv[0]\fR as its argument. It is important not to change the +working directory before the invocation. +\fBTcl_FindExecutable\fR uses \fIargv0\fR along with the \fBPATH\fR environment variable to find the application's executable, if possible. If it fails to find the binary, then future calls to \fBinfo nameofexecutable\fR will return an empty string. .PP +On Windows platforms this procedure is typically invoked as the very +first thing in the application's main program as well; Its \fIargv[0]\fR +argument is only used to indicate whether the executable has a stderr +channel (any non-null value) or not (the value null). If \fBTcl_SetPanicProc\fR +is never called and no debugger is running, this determines whether +the panic message is sent to stderr or to a standard system dialog. +.PP \fBTcl_GetNameOfExecutable\fR simply returns a pointer to the internal full path name of the executable file as computed by \fBTcl_FindExecutable\fR. This procedure call is the C API |
