ADC Home > Reference Library > Reference > Mac OS X > Mac OS X Man Pages

 

This document is a Mac OS X manual page. Manual pages are a command-line technology for providing documentation. You can view these manual pages locally using the man(1) command. These manual pages come from many different sources, and thus, have a variety of writing styles.

For more information about the manual page format, see the manual page for manpages(5).



Tcl_FindExecutable(3)                      Tcl Library Procedures                      Tcl_FindExecutable(3)



____________________________________________________________________________________________________________

NAME
       Tcl_FindExecutable, Tcl_GetNameOfExecutable - identify or return the name of the binary file contain-ing containing
       ing the application

SYNOPSIS
       #include <tcl.h>

       void
       Tcl_FindExecutable(argv0)

       CONST char *
       Tcl_GetNameOfExecutable()

ARGUMENTS
       char   *argv0   (in)      The first command-line argument to the program, which  gives  the  applica-tion's application's
                                 tion's name.
____________________________________________________________________________________________________________


DESCRIPTION
       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 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.  It is important not to change the working
       directory before the invocation.  Tcl_FindExecutable uses argv0 along with the PATH environment vari-able variable
       able  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.


KEYWORDS
       binary, executable file



Tcl                                                  8.1                               Tcl_FindExecutable(3)

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.