Manual Pages for UNIX Darwin command on man FindExec
MyWebUniversity

Manual Pages for UNIX Darwin command on man FindExec

TclFindExecutable(3) Tcl Library Procedures TclFindExecutable(3)

NAME

TclFindExecutable, TclGetNameOfExecutable - identify or return the

name of the binary file containing the application

SYNOPSIS

##iinncclluuddee <>

void TTccllFFiinnddEExxeeccuuttaabbllee(argv0) CONST char * TTccllGGeettNNaammeeOOffEExxeeccuuttaabbllee() AARRGGUUMMEENNTTSS

char *argv0 (in) The first command-line argument to the pro-

gram, which gives the application's name.

DESCRIPTION

The TTccllFFiinnddEExxeeccuuttaabbllee 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 llooaadd command. It is also returned by the iinnffoo nnaammeeooffeexxeeccuuttaabbllee 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. TTccllFFiinnddEExxeeccuuttaabbllee uses argv0 along with the

PPAATTHH environment variable to find the application's executable, if pos-

sible. If it fails to find the binary, then future calls to iinnffoo nnaammee-

ooffeexxeeccuuttaabbllee will return an empty string. TTccllGGeettNNaammeeOOffEExxeeccuuttaabbllee simply returns a pointer to the internal full path name of the executable file as computed by TTccllFFiinnddEExxeeccuuttaabbllee.

This procedure call is the C API equivalent to the iinnffoo nnaammeeooffeexxee-

ccuuttaabbllee command. NULL is returned if the internal full path name has not been computed or unknown. KKEEYYWWOORRDDSS binary, executable file

Tcl 8.1 TclFindExecutable(3)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™