Manual Pages for UNIX Darwin command on man interp
MyWebUniversity

Manual Pages for UNIX Darwin command on man interp

interp(n) Tcl Built-In Commands interp(n)

NAME

interp - Create and manipulate Tcl interpreters

SYNOPSIS

iinntteerrpp option ?arg arg ...?

DESCRIPTION

This command makes it possible to create one or more new Tcl inter-

preters that co-exist with the creating interpreter in the same appli-

cation. The creating interpreter is called the master and the new

interpreter is called a slave. A master can create any number of

slaves, and each slave can itself create additional slaves for which it

is master, resulting in a hierarchy of interpreters.

Each interpreter is independent from the others: it has its own name

space for commands, procedures, and global variables. A master inter-

preter may create connections between its slaves and itself using a

mechanism called an alias. An alias is a command in a slave inter-

preter which, when invoked, causes a command to be invoked in its mas-

ter interpreter or in another slave interpreter. The only other con-

nections between interpreters are through environment variables (the

eennvv variable), which are normally shared among all interpreters in the

application. Note that the name space for files (such as the names

returned by the ooppeenn command) is no longer shared between interpreters.

Explicit commands are provided to share files and to transfer refer-

ences to open files from one interpreter to another.

The iinntteerrpp command also provides support for safe interpreters. A safe

interpreter is a slave whose functions have been greatly restricted, so

that it is safe to execute untrusted scripts without fear of them dam-

aging other interpreters or the application's environment. For example,

all IO channel creation commands and subprocess creation commands are

made inaccessible to safe interpreters. See SAFE INTERPRETERS below |

for more information on what features are present in a safe inter- |

preter. The dangerous functionality is not removed from the safe |

interpreter; instead, it is hidden, so that only trusted interpreters |

can obtain access to it. For a detailed explanation of hidden commands, |

see HIDDEN COMMANDS, below. The alias mechanism can be used for pro- |

tected communication (analogous to a kernel call) between a slave |

interpreter and its master. See ALIAS INVOCATION, below, for more |

details on how the alias mechanism works.

A qualified interpreter name is a proper Tcl lists containing a subset

of its ancestors in the interpreter hierarchy, terminated by the string

naming the interpreter in its immediate master. Interpreter names are

relative to the interpreter in which they are used. For example, if aa

is a slave of the current interpreter and it has a slave aa11, which in

turn has a slave aa1111, the qualified name of aa1111 in aa is the list aa11 aa1111.

The iinntteerrpp command, described below, accepts qualified interpreter

names as arguments; the interpreter in which the command is being eval-

uated can always be referred to as {{}} (the empty list or string). Note

that it is impossible to refer to a master (ancestor) interpreter by

name in a slave interpreter except through aliases. Also, there is no

global name by which one can refer to the first interpreter created in

an application. Both restrictions are motivated by safety concerns. TTHHEE IINNTTEERRPP CCOOMMMMAANNDD | The iinntteerrpp command is used to create, delete, and manipulate slave

interpreters, and to share or transfer channels between interpreters.

It can have any of several forms, depending on the option argument: iinntteerrpp aalliiaass srcPath srcCmd Returns a Tcl list whose elements are the targetCmd and args associated with the alias named srcCmd (all of these are the values specified when the alias was created; it is possible that the actual source command in the slave is different from srcCmd if it was renamed). iinntteerrpp aalliiaass srcPath srcCmd {{}}

Deletes the alias for srcCmd in the slave interpreter identified

by srcPath. srcCmd refers to the name under which the alias was created; if the source command has been renamed, the renamed command will be deleted. iinntteerrpp aalliiaass srcPath srcCmd targetPath targetCmd ?arg arg ...? This command creates an alias between one slave and another (see the aalliiaass slave command below for creating aliases between a slave and its master). In this command, either of the slave

interpreters may be anywhere in the hierarchy of interpreters

under the interpreter invoking the command. SrcPath and srcCmd

identify the source of the alias. SrcPath is a Tcl list whose

elements select a particular interpreter. For example, ``aa bb''

identifies an interpreter bb, which is a slave of interpreter aa,

which is a slave of the invoking interpreter. An empty list

specifies the interpreter invoking the command. srcCmd gives

the name of a new command, which will be created in the source

interpreter. TargetPath and targetCmd specify a target inter-

preter and command, and the arg arguments, if any, specify addi-

tional arguments to targetCmd which are prepended to any argu-

ments specified in the invocation of srcCmd. TargetCmd may be undefined at the time of this call, or it may already exist; it is not created by this command. The alias arranges for the

given target command to be invoked in the target interpreter

whenever the given source command is invoked in the source

interpreter. See ALIAS INVOCATION below for more details.

iinntteerrpp aalliiaasseess ?path? This command returns a Tcl list of the names of all the source

commands for aliases defined in the interpreter identified by

path.

iinntteerrpp ccrreeaattee ?-ssaaffee? ?--? ?path?

Creates a slave interpreter identified by path and a new com-

mand, called a slave command. The name of the slave command is

the last component of path. The new slave interpreter and the

slave command are created in the interpreter identified by the

path obtained by removing the last component from path. For

example, if path is aa bb cc then a new slave interpreter and slave

command named cc are created in the interpreter identified by the

path aa bb. The slave command may be used to manipulate the new

interpreter as described below. If path is omitted, Tcl creates

a unique name of the form iinntteerrppx, where x is an integer, and

uses it for the interpreter and the slave command. If the -ssaaffee

switch is specified (or if the master interpreter is a safe

interpreter), the new slave interpreter will be created as a

safe interpreter with limited functionality; otherwise the slave

will include the full set of Tcl built-in commands and vari-

ables. The -- switch can be used to mark the end of switches;

it may be needed if path is an unusual value such as -ssaaffee. The

result of the command is the name of the new interpreter. The

name of a slave interpreter must be unique among all the slaves

for its master; an error occurs if a slave interpreter by the

given name already exists in this master. The initial recursion

limit of the slave interpreter is set to the current recursion

limit of its parent interpreter.

iinntteerrpp ddeelleettee ?path ...?

Deletes zero or more interpreters given by the optional path

arguments, and for each interpreter, it also deletes its slaves.

The command also deletes the slave command for each interpreter

deleted. For each path argument, if no interpreter by that name

exists, the command raises an error. iinntteerrpp eevvaall path arg ?arg ...? This command concatenates all of the arg arguments in the same fashion as the ccoonnccaatt command, then evaluates the resulting

string as a Tcl script in the slave interpreter identified by

path. The result of this evaluation (including error information such as the eerrrroorrIInnffoo and eerrrroorrCCooddee variables, if an error

occurs) is returned to the invoking interpreter.

iinntteerrpp eexxiissttss path

Returns 11 if a slave interpreter by the specified path exists

in this master, 00 otherwise. If path is omitted, the invoking

interpreter is used.

iinntteerrpp eexxppoossee path hiddenName ?exposedCmd- |

Name? | | Makes the hidden command hiddenName exposed, eventually bringing | it back under a new exposedCmdName name (this name is currently | accepted only if it is a valid global name space name without |

any ::), in the interpreter denoted by path. If an exposed com- |

mand with the targeted name already exists, this command fails. | Hidden commands are explained in more detail in HIDDEN COMMANDS, | below. |

iinntteerrpp hhiiddee path exposedCmdName ?hiddenCmd- |

Name? | | Makes the exposed command exposedCmdName hidden, renaming it to | the hidden command hiddenCmdName, or keeping the same name if |

hiddenCmdName is not given, in the interpreter denoted by path. |

If a hidden command with the targeted name already exists, this | command fails. Currently both exposedCmdName and hiddenCmdName | can not contain namespace qualifiers, or an error is raised. | Commands to be hidden by iinntteerrpp hhiiddee are looked up in the global | namespace even if the current namespace is not the global one. |

This prevents slaves from fooling a master interpreter into hid- |

ing the wrong command, by making the current namespace be dif- |

ferent from the global one. Hidden commands are explained in | more detail in HIDDEN COMMANDS, below. | iinntteerrpp hhiiddddeenn | path | |

Returns a list of the names of all hidden commands in the inter- |

preter identified by path. |

iinntteerrpp iinnvvookkeehhiiddddeenn path ?-gglloobbaall? hiddenCmdName ?arg |

...? | |

Invokes the hidden command hiddenCmdName with the arguments sup- |

plied in the interpreter denoted by path. No substitutions or |

evaluation are applied to the arguments. If the -gglloobbaall flag is |

present, the hidden command is invoked at the global level in |

the target interpreter; otherwise it is invoked at the current |

call frame and can access local variables in that and outer call | frames. Hidden commands are explained in more detail in HIDDEN | COMMANDS, below. iinntteerrpp iissssaaffee ?path?

Returns 11 if the interpreter identified by the specified path is

safe, 00 otherwise. iinntteerrpp mmaarrkkttrruusstteedd | path | |

Marks the interpreter identified by path as trusted. Does not |

expose the hidden commands. This command can only be invoked |

from a trusted interpreter. The command has no effect if the |

interpreter identified by path is already trusted.

iinntteerrpp rreeccuurrssiioonnlliimmiitt path ?newlimit?

Returns the maximum allowable nesting depth for the interpreter

specified by path. If newlimit is specified, the interpreter

recursion limit will be set so that nesting of more than newlimit calls to TTccllEEvvaall(()) and related procedures in that

interpreter will return an error. The newlimit value is also

returned. The newlimit value must be a positive integer between

1 and the maximum value of a non-long integer on the platform.

The command sets the maximum size of the Tcl call stack only. It cannot by itself prevent stack overflows on the C stack being used by the application. If your machine has a limit on the size of the C stack, you may get stack overflows before reaching the limit set by the command. If this happens, see if there is a mechanism in your system for increasing the maximum size of the C stack. iinntteerrpp sshhaarree srcPath channelId destPath Causes the IO channel identified by channelId to become shared

between the interpreter identified by srcPath and the inter-

preter identified by destPath. Both interpreters have the same

permissions on the IO channel. Both interpreters must close it

to close the underlying IO channel; IO channels accessible in an

interpreter are automatically closed when an interpreter is

destroyed. iinntteerrpp ssllaavveess ?path?

Returns a Tcl list of the names of all the slave interpreters

associated with the interpreter identified by path. If path is

omitted, the invoking interpreter is used.

iinntteerrpp ttaarrggeett path alias

Returns a Tcl list describing the target interpreter for an

alias. The alias is specified with an interpreter path and

source command name, just as in iinntteerrpp aalliiaass above. The name of

the target interpreter is returned as an interpreter path, rela-

tive to the invoking interpreter. If the target interpreter for

the alias is the invoking interpreter then an empty list is

returned. If the target interpreter for the alias is not the

invoking interpreter or one of its descendants then an error is

generated. The target command does not have to be defined at the time of this invocation. iinntteerrpp ttrraannssffeerr srcPath channelId destPath

Causes the IO channel identified by channelId to become avail-

able in the interpreter identified by destPath and unavailable

in the interpreter identified by srcPath.

SSLLAAVVEE CCOOMMMMAANNDD

For each slave interpreter created with the iinntteerrpp command, a new Tcl

command is created in the master interpreter with the same name as the

new interpreter. This command may be used to invoke various operations

on the interpreter. It has the following general form:

slave command ?arg arg ...?

Slave is the name of the interpreter, and command and the args deter-

mine the exact behavior of the command. The valid forms of this com-

mand are: slave aalliiaasseess Returns a Tcl list whose elements are the names of all the aliases in slave. The names returned are the srcCmd values used when the aliases were created (which may not be the same as the current names of the commands, if they have been renamed). slave aalliiaass srcCmd Returns a Tcl list whose elements are the targetCmd and args associated with the alias named srcCmd (all of these are the values specified when the alias was created; it is possible that the actual source command in the slave is different from srcCmd if it was renamed). slave aalliiaass srcCmd {{}}

Deletes the alias for srcCmd in the slave interpreter. srcCmd

refers to the name under which the alias was created; if the source command has been renamed, the renamed command will be deleted. slave aalliiaass srcCmd targetCmd ?arg ..? Creates an alias such that whenever srcCmd is invoked in slave, targetCmd is invoked in the master. The arg arguments will be passed to targetCmd as additional arguments, prepended before any arguments passed in the invocation of srcCmd. See ALIAS INVOCATION below for details. slave eevvaall arg ?arg ..? This command concatenates all of the arg arguments in the same fashion as the ccoonnccaatt command, then evaluates the resulting string as a Tcl script in slave. The result of this evaluation (including error information such as the eerrrroorrIInnffoo and eerrrroorrCCooddee variables, if an error occurs) is returned to the invoking

interpreter.

slave eexxppoossee hiddenName ?exposedCmd- |

Name? | | This command exposes the hidden command hiddenName, eventually | bringing it back under a new exposedCmdName name (this name is | currently accepted only if it is a valid global name space name |

without any ::), in slave. If an exposed command with the tar- |

geted name already exists, this command fails. For more details | on hidden commands, see HIDDEN COMMANDS, below. |

slave hhiiddee exposedCmdName ?hiddenCmd- |

Name? | | This command hides the exposed command exposedCmdName, renaming | it to the hidden command hiddenCmdName, or keeping the same name |

if the the argument is not given, in the slave interpreter. If |

a hidden command with the targeted name already exists, this | command fails. Currently both exposedCmdName and hiddenCmdName | can not contain namespace qualifiers, or an error is raised. | Commands to be hidden are looked up in the global namespace even | if the current namespace is not the global one. This prevents |

slaves from fooling a master interpreter into hiding the wrong |

command, by making the current namespace be different from the | global one. For more details on hidden commands, see HIDDEN | COMMANDS, below. |

slave hhiidd- |

ddeenn | | Returns a list of the names of all hidden commands in slave. |

slave iinnvvookkeehhiiddddeenn ?-gglloobbaall hiddenName ?arg |

..? | |

This command invokes the hidden command hiddenName with the sup- |

plied arguments, in slave. No substitutions or evaluations are |

applied to the arguments. If the -gglloobbaall flag is given, the |

command is invoked at the global level in the slave; otherwise | it is invoked at the current call frame and can access local | variables in that or outer call frames. For more details on | hidden commands, see HIDDEN COMMANDS, below. slave iissssaaffee

Returns 11 if the slave interpreter is safe, 00 otherwise.

slave mmaarrkk- |

ttrruusstteedd | |

Marks the slave interpreter as trusted. Can only be invoked by a |

trusted interpreter. This command does not expose any hidden |

commands in the slave interpreter. The command has no effect if |

the slave is already trusted. slave rreeccuurrssiioonnlliimmiitt ?newlimit?

Returns the maximum allowable nesting depth for the slave inter-

preter. If newlimit is specified, the recursion limit in slave will be set so that nesting of more than newlimit calls to TTccllEEvvaall(()) and related procedures in slave will return an error. The newlimit value is also returned. The newlimit value must be

a positive integer between 1 and the maximum value of a non-long

integer on the platform. The command sets the maximum size of the Tcl call stack only. It cannot by itself prevent stack overflows on the C stack being used by the application. If your machine has a limit on the size of the C stack, you may get stack overflows before reaching the limit set by the command. If this happens, see if there is a mechanism in your system for increasing the maximum size of the C stack. SSAAFFEE IINNTTEERRPPRREETTEERRSS

A safe interpreter is one with restricted functionality, so that is

safe to execute an arbitrary script from your worst enemy without fear of that script damaging the enclosing application or the rest of your

computing environment. In order to make an interpreter safe, certain

commands and variables are removed from the interpreter. For example,

commands to create files on disk are removed, and the eexxeecc command is removed, since it could be used to cause damage through subprocesses. Limited access to these facilities can be provided, by creating aliases

to the master interpreter which check their arguments carefully and

provide restricted access to a safe subset of facilities. For example,

file creation might be allowed in a particular subdirectory and subpro-

cess invocation might be allowed for a carefully selected and fixed set of programs.

A safe interpreter is created by specifying the -ssaaffee switch to the

iinntteerrpp ccrreeaattee command. Furthermore, any slave created by a safe inter-

preter will also be safe.

A safe interpreter is created with exactly the following set of built-

in commands: aafftteerr aappppeenndd aarrrraayy bbiinnaarryy bbrreeaakk ccaassee ccaattcchh cclloocckk cclloossee ccoonnccaatt ccoonnttiinnuuee eeooff eerrrroorr eevvaall eexxpprr ffbblloocckkeedd ffccooppyy ffiilleeeevveenntt fflluusshh ffoorr ffoorreeaacchh ffoorrmmaatt ggeettss gglloobbaall iiff iinnccrr iinnffoo iinntteerrpp jjooiinn llaappppeenndd lliinnddeexx lliinnsseerrtt lliisstt lllleennggtthh llrraannggee llrreeppllaaccee llsseeaarrcchh llssoorrtt nnaammeessppaaccee ppaacckkaaggee ppiidd pprroocc ppuuttss rreeaadd rreeggeexxpp rreeggssuubb rreennaammee rreettuurrnn ssccaann sseeeekk sseett sspplliitt ssttrriinngg ssuubbsstt sswwiittcchh tteellll ttiimmee ttrraaccee uunnsseett uuppddaattee uupplleevveell uuppvvaarr vvaarriiaabbllee vvwwaaiitt wwhhiillee The following commands are hidden by iinntteerrpp ccrreeaattee when it creates a |

safe interpreter: |

ccdd eennccooddiinngg eexxeecc eexxiitt | ffccoonnffiigguurree ffiillee gglloobb llooaadd | ooppeenn ppwwdd ssoocckkeett ssoouurrccee | These commands can be recreated later as Tcl procedures or aliases, or |

re-exposed by iinntteerrpp eexxppoossee. |

The following commands from Tcl's library of support procedures are not |

present in a safe interpreter: |

aauuttooeexxeeccookk aauuttooiimmppoorrtt aauuttoollooaadd | aauuttoollooaaddiinnddeexx aauuttooqquuaalliiffyy uunnkknnoowwnn |

Note in particular that safe interpreters have no default uunnkknnoowwnn com- |

mand, so Tcl's default autoloading facilities are not available. | Autoload access to Tcl's commands that are normally autoloaded: | aauuttoommkkiinnddeexx aauuttoommkkiinnddeexxoolldd | aauuttoorreesseett hhiissttoorryy | ppaarrrraayy ppkkggmmkkIInnddeexx | ::::ppkkgg::::ccrreeaattee ::::ssaaffee::::iinntteerrppAAddddTTooAAcccceessssPPaatthh | ::::ssaaffee::::iinntteerrppCCrreeaattee ::::ssaaffee::::iinntteerrppCCoonnffiigguurree | ::::ssaaffee::::iinntteerrppDDeelleettee ::::ssaaffee::::iinntteerrppFFiinnddIInnAAcccceessssPPaatthh | ::::ssaaffee::::iinntteerrppIInniitt ::::ssaaffee::::sseettLLooggCCmmdd | ttcclleennddOOffWWoorrdd ttccllffiinnddLLiibbrraarryy | ttccllssttaarrttOOffNNeexxttWWoorrdd ttccllssttaarrttOOffPPrreevviioouussWWoorrdd | ttccllwwoorrddBBrreeaakkAAfftteerr ttccllwwoorrddBBrreeaakkBBeeffoorree | can only be provided by explicit definition of an uunnkknnoowwnn command in |

the safe interpreter. This will involve exposing the ssoouurrccee command. |

This is most easily accomplished by creating the safe interpreter with |

Tcl's SSaaffee-TTccll mechanism. SSaaffee-TTccll provides safe versions of ssoouurrccee, |

llooaadd, and other Tcl commands needed to support autoloading of commands | and the loading of packages.

In addition, the eennvv variable is not present in a safe interpreter, so

it cannot share environment variables with other interpreters. The eennvv

variable poses a security risk, because users can store sensitive information in an environment variable. For example, the PGP manual

recommends storing the PGP private key protection password in the envi-

ronment variable PGPPASS. Making this variable available to untrusted

code executing in a safe interpreter would incur a security risk.

If extensions are loaded into a safe interpreter, they may also

restrict their own functionality to eliminate unsafe commands. For a discussion of management of extensions for safety see the manual

entries for SSaaffee-TTccll and the llooaadd Tcl command.

A safe interpreter may not alter the recursion limit of any inter-

preter, including itself. AALLIIAASS IINNVVOOCCAATTIIOONN The alias mechanism has been carefully designed so that it can be used safely when an untrusted script is executing in a safe slave and the target of the alias is a trusted master. The most important thing in guaranteeing safety is to ensure that information passed from the slave to the master is never evaluated or substituted in the master; if this were to occur, it would enable an evil script in the slave to invoke arbitrary functions in the master, which would compromise security.

When the source for an alias is invoked in the slave interpreter, the

usual Tcl substitutions are performed when parsing that command. These

substitutions are carried out in the source interpreter just as they

would be for any other command invoked in that interpreter. The com-

mand procedure for the source command takes its arguments and merges them with the targetCmd and args for the alias to create a new array of arguments. If the words of srcCmd were ``srcCmd arg1 arg2 ... argN'', the new set of words will be ``targetCmd arg arg ... arg arg1 arg2 ... argN'', where targetCmd and args are the values supplied when the alias was created. TargetCmd is then used to locate a command procedure in

the target interpreter, and that command procedure is invoked with the

new set of arguments. An error occurs if there is no command named

targetCmd in the target interpreter. No additional substitutions are

performed on the words: the target command procedure is invoked directly, without going through the normal Tcl evaluation mechanism. Substitutions are thus performed on each word exactly once: targetCmd and args were substituted when parsing the command that created the

alias, and arg1 - argN are substituted when the alias's source command

is parsed in the source interpreter.

When writing the targetCmds for aliases in safe interpreters, it is

very important that the arguments to that command never be evaluated or substituted, since this would provide an escape mechanism whereby the

slave interpreter could execute arbitrary code in the master. This in

turn would compromise the security of the system. HHIIDDDDEENN CCOOMMMMAANNDDSS |

Safe interpreters greatly restrict the functionality available to Tcl |

programs executing within them. Allowing the untrusted Tcl program to | have direct access to this functionality is unsafe, because it can be | used for a variety of attacks on the environment. However, there are |

times when there is a legitimate need to use the dangerous functional- |

ity in the context of the safe interpreter. For example, sometimes a |

program must be ssoouurrcceed into the interpreter. Another example is Tk, |

where windows are bound to the hierarchy of windows for a specific |

interpreter; some potentially dangerous functions, e.g. window manage- |

ment, must be performed on these windows within the interpreter con- |

text. | The iinntteerrpp command provides a solution to this problem in the form of | hidden commands. Instead of removing the dangerous commands entirely |

from a safe interpreter, these commands are hidden so they become |

unavailable to Tcl scripts executing in the interpreter. However, such |

hidden commands can be invoked by any trusted ancestor of the safe |

interpreter, in the context of the safe interpreter, using iinntteerrpp |

iinnvvookkee. Hidden commands and exposed commands reside in separate name |

spaces. It is possible to define a hidden command and an exposed com- |

mand by the same name within one interpreter. |

Hidden commands in a slave interpreter can be invoked in the body of |

procedures called in the master during alias invocation. For example, |

an alias for ssoouurrccee could be created in a slave interpreter. When it is |

invoked in the slave interpreter, a procedure is called in the master |

interpreter to check that the operation is allowable (e.g. it asks to |

source a file that the slave interpreter is allowed to access). The |

procedure then it invokes the hidden ssoouurrccee command in the slave inter- |

preter to actually source in the contents of the file. Note that two |

commands named ssoouurrccee exist in the slave interpreter: the alias, and |

the hidden command. |

Because a master interpreter may invoke a hidden command as part of |

handling an alias invocation, great care must be taken to avoid evalu- |

ating any arguments passed in through the alias invocation. Otherwise, |

malicious slave interpreters could cause a trusted master interpreter |

to execute dangerous commands on their behalf. See the section on ALIAS | INVOCATION for a more complete discussion of this topic. To help avoid | this problem, no substitutions or evaluations are applied to arguments | of iinntteerrpp iinnvvookkeehhiiddddeenn. |

Safe interpreters are not allowed to invoke hidden commands in them- |

selves or in their descendants. This prevents safe slaves from gaining | access to hidden functionality in themselves or their descendants. |

The set of hidden commands in an interpreter can be manipulated by a |

trusted interpreter using iinntteerrpp eexxppoossee and iinntteerrpp hhiiddee. The iinntteerrpp |

eexxppoossee command moves a hidden command to the set of exposed commands in |

the interpreter identified by path, potentially renaming the command in |

the process. If an exposed command by the targeted name already exists, | the operation fails. Similarly, iinntteerrpp hhiiddee moves an exposed command to |

the set of hidden commands in that interpreter. Safe interpreters are |

not allowed to move commands between the set of hidden and exposed com- |

mands, in either themselves or their descendants. |

Currently, the names of hidden commands cannot contain namespace quali- |

fiers, and you must first rename a command in a namespace to the global | namespace before you can hide it. Commands to be hidden by iinntteerrpp hhiiddee | are looked up in the global namespace even if the current namespace is |

not the global one. This prevents slaves from fooling a master inter- |

preter into hiding the wrong command, by making the current namespace | be different from the global one. CCRREEDDIITTSS

This mechanism is based on the Safe-Tcl prototype implemented by

Nathaniel Borenstein and Marshall Rose.

SEE ALSO

load(n), safe(n), TclCreateSlave(3) KKEEYYWWOORRDDSS

alias, master interpreter, safe interpreter, slave interpreter

Tcl 7.6 interp(n)




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