summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/CrtAlias.322
-rw-r--r--library/safe.tcl338
-rw-r--r--tests/ioCmd.test6
-rw-r--r--tests/ioTrans.test16
-rw-r--r--tests/oo.test136
-rw-r--r--tests/ooNext2.test8
-rw-r--r--tests/safe.test2
-rw-r--r--tests/socket.test30
8 files changed, 279 insertions, 279 deletions
diff --git a/doc/CrtAlias.3 b/doc/CrtAlias.3
index 2934fc3..a642d08 100644
--- a/doc/CrtAlias.3
+++ b/doc/CrtAlias.3
@@ -136,17 +136,17 @@ interpreter. The return value for those procedures that return an \fBint\fR
is either \fBTCL_OK\fR or \fBTCL_ERROR\fR. If \fBTCL_ERROR\fR is returned
then the interpreter's result contains an error message.
.PP
-\fBTcl_CreateSlave\fR creates a new interpreter as a slave of \fIinterp\fR.
-It also creates a slave command named \fIslaveName\fR in \fIinterp\fR which
-allows \fIinterp\fR to manipulate the new slave.
-If \fIisSafe\fR is zero, the command creates a trusted slave in which Tcl
+\fBTcl_CreateSlave\fR creates a new interpreter as a child of \fIinterp\fR.
+It also creates a child command named \fIchildName\fR in \fIinterp\fR which
+allows \fIinterp\fR to manipulate the new child.
+If \fIisSafe\fR is zero, the command creates a trusted child in which Tcl
code has access to all the Tcl commands.
If it is \fB1\fR, the command creates a
.QW safe
-slave in which Tcl code has access only to set of Tcl commands defined as
+child in which Tcl code has access only to set of Tcl commands defined as
.QW "Safe Tcl" ;
see the manual entry for the Tcl \fBinterp\fR command for details.
-If the creation of the new slave interpreter failed, \fBNULL\fR is returned.
+If the creation of the new child interpreter failed, \fBNULL\fR is returned.
.PP
.VS "TIP 581"
\fBTcl_CreateChild\fR is a synonym for \fBTcl_CreateSlave\fR.
@@ -169,9 +169,9 @@ Callers will want to take care with their use of \fBTcl_MakeSafe\fR
to avoid false claims of safety. For many situations, \fBTcl_CreateSlave\fR
may be a better choice, since it creates interpreters in a known-safe state.
.PP
-\fBTcl_GetSlave\fR returns a pointer to a slave interpreter of
-\fIinterp\fR. The slave interpreter is identified by \fIslaveName\fR.
-If no such slave interpreter exists, \fBNULL\fR is returned.
+\fBTcl_GetSlave\fR returns a pointer to a child interpreter of
+\fIinterp\fR. The child interpreter is identified by \fIchildName\fR.
+If no such child interpreter exists, \fBNULL\fR is returned.
.PP
.VS "TIP 581"
\fBTcl_GetChild\fR is a synonym for \fBTcl_GetSlave\fR.
@@ -187,7 +187,7 @@ top-level interpreter) then \fBNULL\fR is returned.
.PP
\fBTcl_GetInterpPath\fR stores in the result of \fIinterp\fR
the relative path between \fIinterp\fR and \fIchildInterp\fR;
-\fIchildInterp\fR must be a slave of \fIinterp\fR. If the computation
+\fIchildInterp\fR must be a child of \fIinterp\fR. If the computation
of the relative path succeeds, \fBTCL_OK\fR is returned, else
\fBTCL_ERROR\fR is returned and an error message is stored as the
result of \fIinterp\fR.
@@ -260,4 +260,4 @@ interp
.SH KEYWORDS
alias, command, exposed commands, hidden commands, interpreter, invoke,
-master, slave
+parent, child
diff --git a/library/safe.tcl b/library/safe.tcl
index 96177d5..48cb0de 100644
--- a/library/safe.tcl
+++ b/library/safe.tcl
@@ -1,9 +1,9 @@
# safe.tcl --
#
# This file provide a safe loading/sourcing mechanism for safe interpreters.
-# It implements a virtual path mecanism to hide the real pathnames from the
-# slave. It runs in a parent interpreter and sets up data structure and
-# aliases that will be invoked when used from a slave interpreter.
+# It implements a virtual path mechanism to hide the real pathnames from the
+# child. It runs in a parent interpreter and sets up data structure and
+# aliases that will be invoked when used from a child interpreter.
#
# See the safe.n man page for details.
#
@@ -94,12 +94,12 @@ proc ::safe::interpInit {args} {
[InterpStatics] [InterpNested] $deleteHook
}
-# Check that the given slave is "one of us"
-proc ::safe::CheckInterp {slave} {
- namespace upvar ::safe [VarName $slave] state
- if {![info exists state] || ![::interp exists $slave]} {
+# Check that the given child is "one of us"
+proc ::safe::CheckInterp {child} {
+ namespace upvar ::safe [VarName $child] state
+ if {![info exists state] || ![::interp exists $child]} {
return -code error \
- "\"$slave\" is not an interpreter managed by ::safe::"
+ "\"$child\" is not an interpreter managed by ::safe::"
}
}
@@ -121,7 +121,7 @@ proc ::safe::interpConfigure {args} {
1 {
# If we have exactly 1 argument the semantic is to return all
# the current configuration. We still call OptKeyParse though
- # we know that "slave" is our given argument because it also
+ # we know that "child" is our given argument because it also
# checks for the "-help" option.
set Args [::tcl::OptKeyParse ::safe::interpIC $args]
CheckInterp $slave
@@ -220,7 +220,7 @@ proc ::safe::interpConfigure {args} {
}
# we can now reconfigure :
InterpSetConfig $slave $accessPath $statics $nested $deleteHook
- # auto_reset the slave (to completly synch the new access_path)
+ # auto_reset the child (to completly synch the new access_path)
if {$doreset} {
if {[catch {::interp eval $slave {auto_reset}} msg]} {
Log $slave "auto_reset failed: $msg"
@@ -260,15 +260,15 @@ proc ::safe::interpConfigure {args} {
#
# safe::InterpCreate : doing the real job
#
-# This procedure creates a safe slave and initializes it with the safe
+# This procedure creates a safe child and initializes it with the safe
# base aliases.
-# NB: slave name must be simple alphanumeric string, no spaces, no (), no
+# NB: child name must be simple alphanumeric string, no spaces, no (), no
# {},... {because the state array is stored as part of the name}
#
-# Returns the slave name.
+# Returns the child name.
#
# Optional Arguments :
-# + slave name : if empty, generated name will be used
+# + child name : if empty, generated name will be used
# + access_path: path list controlling where load/source can occur,
# if empty: the parent auto_path will be used.
# + staticsok : flag, if 0 :no static package can be loaded (load {} Xxx)
@@ -278,37 +278,37 @@ proc ::safe::interpConfigure {args} {
# use the full name and no indent so auto_mkIndex can find us
proc ::safe::InterpCreate {
- slave
+ child
access_path
staticsok
nestedok
deletehook
} {
- # Create the slave.
+ # Create the child.
# If evaluated in ::safe, the interpreter command for foo is ::foo;
# but for foo::bar is safe::foo::bar. So evaluate in :: instead.
- if {$slave ne ""} {
- namespace eval :: [list ::interp create -safe $slave]
+ if {$child ne ""} {
+ namespace eval :: [list ::interp create -safe $child]
} else {
- # empty argument: generate slave name
- set slave [::interp create -safe]
+ # empty argument: generate child name
+ set child [::interp create -safe]
}
- Log $slave "Created" NOTICE
+ Log $child "Created" NOTICE
- # Initialize it. (returns slave name)
- InterpInit $slave $access_path $staticsok $nestedok $deletehook
+ # Initialize it. (returns child name)
+ InterpInit $child $access_path $staticsok $nestedok $deletehook
}
#
# InterpSetConfig (was setAccessPath) :
-# Sets up slave virtual auto_path and corresponding structure within
-# the parent. Also sets the tcl_library in the slave to be the first
+# Sets up child virtual auto_path and corresponding structure within
+# the parent. Also sets the tcl_library in the child to be the first
# directory in the path.
-# NB: If you change the path after the slave has been initialized you
-# probably need to call "auto_reset" in the slave in order that it gets
+# NB: If you change the path after the child has been initialized you
+# probably need to call "auto_reset" in the child in order that it gets
# the right auto_index() array values.
-proc ::safe::InterpSetConfig {slave access_path staticsok nestedok deletehook} {
+proc ::safe::InterpSetConfig {child access_path staticsok nestedok deletehook} {
global auto_path
# determine and store the access path if empty
@@ -321,33 +321,33 @@ proc ::safe::InterpSetConfig {slave access_path staticsok nestedok deletehook} {
if {$where == -1} {
# not found, add it.
set access_path [linsert $access_path 0 [info library]]
- Log $slave "tcl_library was not in auto_path,\
+ Log $child "tcl_library was not in auto_path,\
added it to slave's access_path" NOTICE
} elseif {$where != 0} {
# not first, move it first
set access_path [linsert \
[lreplace $access_path $where $where] \
0 [info library]]
- Log $slave "tcl_libray was not in first in auto_path,\
+ Log $child "tcl_libray was not in first in auto_path,\
moved it to front of slave's access_path" NOTICE
}
# Add 1st level sub dirs (will searched by auto loading from tcl
- # code in the slave using glob and thus fail, so we add them here
+ # code in the child using glob and thus fail, so we add them here
# so by default it works the same).
set access_path [AddSubDirs $access_path]
}
- Log $slave "Setting accessPath=($access_path) staticsok=$staticsok\
+ Log $child "Setting accessPath=($access_path) staticsok=$staticsok\
nestedok=$nestedok deletehook=($deletehook)" NOTICE
- namespace upvar ::safe [VarName $slave] state
+ namespace upvar ::safe [VarName $child] state
# clear old autopath if it existed
# build new one
# Extend the access list with the paths used to look for Tcl Modules.
# We save the virtual form separately as well, as syncing it with the
- # slave has to be defered until the necessary commands are present for
+ # child has to be deferred until the necessary commands are present for
# setup.
set norm_access_path {}
@@ -420,7 +420,7 @@ proc ::safe::InterpSetConfig {slave access_path staticsok nestedok deletehook} {
set state(nestedok) $nestedok
set state(cleanupHook) $deletehook
- SyncAccessPath $slave
+ SyncAccessPath $child
return
}
@@ -429,9 +429,9 @@ proc ::safe::InterpSetConfig {slave access_path staticsok nestedok deletehook} {
# FindInAccessPath:
# Search for a real directory and returns its virtual Id (including the
# "$")
-proc ::safe::interpFindInAccessPath {slave path} {
- CheckInterp $slave
- namespace upvar ::safe [VarName $slave] state
+proc ::safe::interpFindInAccessPath {child path} {
+ CheckInterp $child
+ namespace upvar ::safe [VarName $child] state
if {![dict exists $state(access_path,remap) $path]} {
return -code error "$path not found in access path"
@@ -444,11 +444,11 @@ proc ::safe::interpFindInAccessPath {slave path} {
# addToAccessPath:
# add (if needed) a real directory to access path and return its
# virtual token (including the "$").
-proc ::safe::interpAddToAccessPath {slave path} {
+proc ::safe::interpAddToAccessPath {child path} {
# first check if the directory is already in there
# (inlined interpFindInAccessPath).
- CheckInterp $slave
- namespace upvar ::safe [VarName $slave] state
+ CheckInterp $child
+ namespace upvar ::safe [VarName $child] state
if {[dict exists $state(access_path,remap) $path]} {
return [dict get $state(access_path,remap) $path]
@@ -463,7 +463,7 @@ proc ::safe::interpAddToAccessPath {slave path} {
lappend state(access_path,remap) $path $token
lappend state(access_path,norm) [file normalize $path]
- SyncAccessPath $slave
+ SyncAccessPath $child
return $token
}
@@ -471,25 +471,25 @@ proc ::safe::interpAddToAccessPath {slave path} {
# interpreter. It is useful when you want to install the safe base aliases
# into a preexisting safe interpreter.
proc ::safe::InterpInit {
- slave
+ child
access_path
staticsok
nestedok
deletehook
} {
# Configure will generate an access_path when access_path is empty.
- InterpSetConfig $slave $access_path $staticsok $nestedok $deletehook
+ InterpSetConfig $child $access_path $staticsok $nestedok $deletehook
# NB we need to add [namespace current], aliases are always absolute
# paths.
- # These aliases let the slave load files to define new commands
- # This alias lets the slave use the encoding names, convertfrom,
+ # These aliases let the child load files to define new commands
+ # This alias lets the child use the encoding names, convertfrom,
# convertto, and system, but not "encoding system <name>" to set the
# system encoding.
# Handling Tcl Modules, we need a restricted form of Glob.
# This alias interposes on the 'exit' command and cleanly terminates
- # the slave.
+ # the child.
foreach {command alias} {
source AliasSource
@@ -498,61 +498,61 @@ proc ::safe::InterpInit {
exit interpDelete
glob AliasGlob
} {
- ::interp alias $slave $command {} [namespace current]::$alias $slave
+ ::interp alias $child $command {} [namespace current]::$alias $child
}
- # This alias lets the slave have access to a subset of the 'file'
+ # This alias lets the child have access to a subset of the 'file'
# command functionality.
- ::interp expose $slave file
+ ::interp expose $child file
foreach subcommand {dirname extension rootname tail} {
- ::interp alias $slave ::tcl::file::$subcommand {} \
- ::safe::AliasFileSubcommand $slave $subcommand
+ ::interp alias $child ::tcl::file::$subcommand {} \
+ ::safe::AliasFileSubcommand $child $subcommand
}
foreach subcommand {
atime attributes copy delete executable exists isdirectory isfile
link lstat mtime mkdir nativename normalize owned readable readlink
rename size stat tempfile type volumes writable
} {
- ::interp alias $slave ::tcl::file::$subcommand {} \
- ::safe::BadSubcommand $slave file $subcommand
+ ::interp alias $child ::tcl::file::$subcommand {} \
+ ::safe::BadSubcommand $child file $subcommand
}
# Subcommands of info
foreach {subcommand alias} {
nameofexecutable AliasExeName
} {
- ::interp alias $slave ::tcl::info::$subcommand \
- {} [namespace current]::$alias $slave
+ ::interp alias $child ::tcl::info::$subcommand \
+ {} [namespace current]::$alias $child
}
- # The allowed slave variables already have been set by Tcl_MakeSafe(3)
+ # The allowed child variables already have been set by Tcl_MakeSafe(3)
- # Source init.tcl and tm.tcl into the slave, to get auto_load and
+ # Source init.tcl and tm.tcl into the child, to get auto_load and
# other procedures defined:
- if {[catch {::interp eval $slave {
+ if {[catch {::interp eval $child {
source [file join $tcl_library init.tcl]
}} msg opt]} {
- Log $slave "can't source init.tcl ($msg)"
- return -options $opt "can't source init.tcl into slave $slave ($msg)"
+ Log $child "can't source init.tcl ($msg)"
+ return -options $opt "can't source init.tcl into slave $child ($msg)"
}
- if {[catch {::interp eval $slave {
+ if {[catch {::interp eval $child {
source [file join $tcl_library tm.tcl]
}} msg opt]} {
- Log $slave "can't source tm.tcl ($msg)"
- return -options $opt "can't source tm.tcl into slave $slave ($msg)"
+ Log $child "can't source tm.tcl ($msg)"
+ return -options $opt "can't source tm.tcl into slave $child ($msg)"
}
# Sync the paths used to search for Tcl modules. This can be done only
# now, after tm.tcl was loaded.
- namespace upvar ::safe [VarName $slave] state
+ namespace upvar ::safe [VarName $child] state
if {[llength $state(tm_path_slave)] > 0} {
- ::interp eval $slave [list \
+ ::interp eval $child [list \
::tcl::tm::add {*}[lreverse $state(tm_path_slave)]]
}
- return $slave
+ return $child
}
# Add (only if needed, avoid duplicates) 1 level of sub directories to an
@@ -578,30 +578,30 @@ proc ::safe::AddSubDirs {pathList} {
return $res
}
-# This procedure deletes a safe slave managed by Safe Tcl and cleans up
+# This procedure deletes a safe child managed by Safe Tcl and cleans up
# associated state.
# - The command will also delete non-Safe-Base interpreters.
# - This is regrettable, but to avoid breaking existing code this should be
# amended at the next major revision by uncommenting "CheckInterp".
-proc ::safe::interpDelete {slave} {
- Log $slave "About to delete" NOTICE
+proc ::safe::interpDelete {child} {
+ Log $child "About to delete" NOTICE
- # CheckInterp $slave
- namespace upvar ::safe [VarName $slave] state
+ # CheckInterp $child
+ namespace upvar ::safe [VarName $child] state
# When an interpreter is deleted with [interp delete], any sub-interpreters
# are deleted automatically, but this leaves behind their data in the Safe
# Base. To clean up properly, we call safe::interpDelete recursively on each
# Safe Base sub-interpreter, so each one is deleted cleanly and not by
# the automatic mechanism built into [interp delete].
- foreach sub [interp children $slave] {
- if {[info exists ::safe::[VarName [list $slave $sub]]]} {
- ::safe::interpDelete [list $slave $sub]
+ foreach sub [interp children $child] {
+ if {[info exists ::safe::[VarName [list $child $sub]]]} {
+ ::safe::interpDelete [list $child $sub]
}
}
- # If the slave has a cleanup hook registered, call it. Check the
+ # If the child has a cleanup hook registered, call it. Check the
# existance because we might be called to delete an interp which has
# not been registered with us at all
@@ -612,14 +612,14 @@ proc ::safe::interpDelete {slave} {
# we'll loop
unset state(cleanupHook)
try {
- {*}$hook $slave
+ {*}$hook $child
} on error err {
- Log $slave "Delete hook error ($err)"
+ Log $child "Delete hook error ($err)"
}
}
}
- # Discard the global array of state associated with the slave, and
+ # Discard the global array of state associated with the child, and
# delete the interpreter.
if {[info exists state]} {
@@ -628,9 +628,9 @@ proc ::safe::interpDelete {slave} {
# if we have been called twice, the interp might have been deleted
# already
- if {[::interp exists $slave]} {
- ::interp delete $slave
- Log $slave "Deleted" NOTICE
+ if {[::interp exists $child]} {
+ ::interp delete $child
+ Log $child "Deleted" NOTICE
}
return
@@ -656,9 +656,9 @@ proc ::safe::setLogCmd {args} {
} else {
# Activate logging, define proper command.
- proc ::safe::Log {slave msg {type ERROR}} {
+ proc ::safe::Log {child msg {type ERROR}} {
variable Log
- {*}$Log "$type for slave $slave : $msg"
+ {*}$Log "$type for slave $child : $msg"
return
}
}
@@ -667,23 +667,23 @@ proc ::safe::setLogCmd {args} {
# ------------------- END OF PUBLIC METHODS ------------
#
-# Sets the slave auto_path to the parent recorded value. Also sets
+# Sets the child auto_path to the parent recorded value. Also sets
# tcl_library to the first token of the virtual path.
#
-proc ::safe::SyncAccessPath {slave} {
- namespace upvar ::safe [VarName $slave] state
+proc ::safe::SyncAccessPath {child} {
+ namespace upvar ::safe [VarName $child] state
set slave_access_path $state(access_path,slave)
- ::interp eval $slave [list set auto_path $slave_access_path]
+ ::interp eval $child [list set auto_path $slave_access_path]
- Log $slave "auto_path in $slave has been set to $slave_access_path"\
+ Log $child "auto_path in $child has been set to $slave_access_path"\
NOTICE
# This code assumes that info library is the first element in the
# list of auto_path's. See -> InterpSetConfig for the code which
# ensures this condition.
- ::interp eval $slave [list \
+ ::interp eval $child [list \
set tcl_library [lindex $slave_access_path 0]]
}
@@ -697,8 +697,8 @@ proc ::safe::PathToken {n} {
#
# translate virtual path into real path
#
-proc ::safe::TranslatePath {slave path} {
- namespace upvar ::safe [VarName $slave] state
+proc ::safe::TranslatePath {child path} {
+ namespace upvar ::safe [VarName $child] state
# somehow strip the namespaces 'functionality' out (the danger is that
# we would strip valid macintosh "../" queries... :
@@ -713,7 +713,7 @@ proc ::safe::TranslatePath {slave path} {
# file name control (limit access to files/resources that should be a
# valid tcl source file)
-proc ::safe::CheckFileName {slave file} {
+proc ::safe::CheckFileName {child file} {
# This used to limit what can be sourced to ".tcl" and forbid files
# with more than 1 dot and longer than 14 chars, but I changed that
# for 8.4 as a safe interp has enough internal protection already to
@@ -734,17 +734,17 @@ proc ::safe::CheckFileName {slave file} {
# interpreters that are *almost* safe. In particular, it just acts to
# prevent discovery of what home directories exist.
-proc ::safe::AliasFileSubcommand {slave subcommand name} {
+proc ::safe::AliasFileSubcommand {child subcommand name} {
if {[string match ~* $name]} {
set name ./$name
}
- tailcall ::interp invokehidden $slave tcl:file:$subcommand $name
+ tailcall ::interp invokehidden $child tcl:file:$subcommand $name
}
# AliasGlob is the target of the "glob" alias in safe interpreters.
-proc ::safe::AliasGlob {slave args} {
- Log $slave "GLOB ! $args" NOTICE
+proc ::safe::AliasGlob {child args} {
+ Log $child "GLOB ! $args" NOTICE
set cmd {}
set at 0
array set got {
@@ -789,7 +789,7 @@ proc ::safe::AliasGlob {slave args} {
incr at
}
-* {
- Log $slave "Safe base rejecting glob option '$opt'"
+ Log $child "Safe base rejecting glob option '$opt'"
return -code error "Safe base rejecting glob option '$opt'"
}
default {
@@ -800,14 +800,14 @@ proc ::safe::AliasGlob {slave args} {
}
# Get the real path from the virtual one and check that the path is in the
- # access path of that slave. Done after basic argument processing so that
+ # access path of that child. Done after basic argument processing so that
# we know if -nocomplain is set.
if {$got(-directory)} {
try {
- set dir [TranslatePath $slave $virtualdir]
- DirInAccessPath $slave $dir
+ set dir [TranslatePath $child $virtualdir]
+ DirInAccessPath $child $dir
} on error msg {
- Log $slave $msg
+ Log $child $msg
if {$got(-nocomplain)} return
return -code error "permission denied"
}
@@ -820,7 +820,7 @@ proc ::safe::AliasGlob {slave args} {
# The code after this "if ... else" block would conspire to return with
# no results in this case, if it were allowed to proceed. Instead,
# return now and reduce the number of cases to be considered later.
- Log $slave {option -directory must be supplied}
+ Log $child {option -directory must be supplied}
if {$got(-nocomplain)} return
return -code error "permission denied"
}
@@ -846,11 +846,11 @@ proc ::safe::AliasGlob {slave args} {
# after removing any subdir that are not in the access path.
if {($thedir eq "*") && ($thefile eq "pkgIndex.tcl")} {
set mapped 0
- foreach d [glob -directory [TranslatePath $slave $virtualdir] \
+ foreach d [glob -directory [TranslatePath $child $virtualdir] \
-types d -tails *] {
catch {
- DirInAccessPath $slave \
- [TranslatePath $slave [file join $virtualdir $d]]
+ DirInAccessPath $child \
+ [TranslatePath $child [file join $virtualdir $d]]
lappend cmd [file join $d $thefile]
set mapped 1
}
@@ -876,17 +876,17 @@ proc ::safe::AliasGlob {slave args} {
# - Bug [3529949] relates to unwanted expansion of ~${foo} and this is
# how the present code avoids the bug. All tests safe-16.* relate.
try {
- DirInAccessPath $slave [TranslatePath $slave \
+ DirInAccessPath $child [TranslatePath $child \
[file join $virtualdir $thedir]]
} on error msg {
- Log $slave $msg
+ Log $child $msg
if {$got(-nocomplain)} continue
return -code error "permission denied"
}
lappend cmd $opt
}
- Log $slave "GLOB = $cmd" NOTICE
+ Log $child "GLOB = $cmd" NOTICE
if {$got(-nocomplain) && [llength $cmd] eq $firstPattern} {
return
@@ -899,17 +899,17 @@ proc ::safe::AliasGlob {slave args} {
# which are a list of names each with tail pkgIndex.tcl. The purpose
# of the call to glob is to remove the names for which the file does
# not exist.
- set entries [::interp invokehidden $slave glob {*}$cmd]
+ set entries [::interp invokehidden $child glob {*}$cmd]
} on error msg {
# This is the only place that a call with -nocomplain and no invalid
# "dash-options" can return an error.
- Log $slave $msg
+ Log $child $msg
return -code error "script error"
}
- Log $slave "GLOB < $entries" NOTICE
+ Log $child "GLOB < $entries" NOTICE
- # Translate path back to what the slave should see.
+ # Translate path back to what the child should see.
set res {}
set l [string length $dir]
foreach p $entries {
@@ -919,13 +919,13 @@ proc ::safe::AliasGlob {slave args} {
lappend res $p
}
- Log $slave "GLOB > $res" NOTICE
+ Log $child "GLOB > $res" NOTICE
return $res
}
# AliasSource is the target of the "source" alias in safe interpreters.
-proc ::safe::AliasSource {slave args} {
+proc ::safe::AliasSource {child args} {
set argc [llength $args]
# Extended for handling of Tcl Modules to allow not only "source
# filename", but "source -encoding E filename" as well.
@@ -934,7 +934,7 @@ proc ::safe::AliasSource {slave args} {
set encoding [lindex $args 1]
set at 2
if {$encoding eq "identity"} {
- Log $slave "attempt to use the identity encoding"
+ Log $child "attempt to use the identity encoding"
return -code error "permission denied"
}
} else {
@@ -943,24 +943,24 @@ proc ::safe::AliasSource {slave args} {
}
if {$argc != 1} {
set msg "wrong # args: should be \"source ?-encoding E? fileName\""
- Log $slave "$msg ($args)"
+ Log $child "$msg ($args)"
return -code error $msg
}
set file [lindex $args $at]
# get the real path from the virtual one.
if {[catch {
- set realfile [TranslatePath $slave $file]
+ set realfile [TranslatePath $child $file]
} msg]} {
- Log $slave $msg
+ Log $child $msg
return -code error "permission denied"
}
- # check that the path is in the access path of that slave
+ # check that the path is in the access path of that child
if {[catch {
- FileInAccessPath $slave $realfile
+ FileInAccessPath $child $realfile
} msg]} {
- Log $slave $msg
+ Log $child $msg
return -code error "permission denied"
}
@@ -969,16 +969,16 @@ proc ::safe::AliasSource {slave args} {
# to tclLog. Has no effect on other callers of ::source, which are in
# "package ifneeded" scripts.
if {[catch {
- CheckFileName $slave $realfile
+ CheckFileName $child $realfile
} msg]} {
- Log $slave "$realfile:$msg"
+ Log $child "$realfile:$msg"
return -code error -errorcode {POSIX EACCES} $msg
}
# Passed all the tests, lets source it. Note that we do this all manually
- # because we want to control [info script] in the slave so information
+ # because we want to control [info script] in the child so information
# doesn't leak so much. [Bug 2913625]
- set old [::interp eval $slave {info script}]
+ set old [::interp eval $child {info script}]
set replacementMsg "script error"
set code [catch {
set f [open $realfile]
@@ -988,17 +988,17 @@ proc ::safe::AliasSource {slave args} {
}
set contents [read $f]
close $f
- ::interp eval $slave [list info script $file]
+ ::interp eval $child [list info script $file]
} msg opt]
if {$code == 0} {
- set code [catch {::interp eval $slave $contents} msg opt]
+ set code [catch {::interp eval $child $contents} msg opt]
set replacementMsg $msg
}
- catch {interp eval $slave [list info script $old]}
+ catch {interp eval $child [list info script $old]}
# Note that all non-errors are fine result codes from [source], so we must
# take a little care to do it properly. [Bug 2923613]
if {$code == 1} {
- Log $slave $msg
+ Log $child $msg
return -code error $replacementMsg
}
return -code $code -options $opt $msg
@@ -1006,18 +1006,18 @@ proc ::safe::AliasSource {slave args} {
# AliasLoad is the target of the "load" alias in safe interpreters.
-proc ::safe::AliasLoad {slave file args} {
+proc ::safe::AliasLoad {child file args} {
set argc [llength $args]
if {$argc > 2} {
set msg "load error: too many arguments"
- Log $slave "$msg ($argc) {$file $args}"
+ Log $child "$msg ($argc) {$file $args}"
return -code error $msg
}
# package name (can be empty if file is not).
set package [lindex $args 0]
- namespace upvar ::safe [VarName $slave] state
+ namespace upvar ::safe [VarName $child] state
# Determine where to load. load use a relative interp path and {}
# means self, so we can directly and safely use passed arg.
@@ -1026,7 +1026,7 @@ proc ::safe::AliasLoad {slave file args} {
# we will try to load into a sub sub interp; check that we want to
# authorize that.
if {!$state(nestedok)} {
- Log $slave "loading to a sub interp (nestedok)\
+ Log $child "loading to a sub interp (nestedok)\
disabled (trying to load $package to $target)"
return -code error "permission denied (nested load)"
}
@@ -1037,11 +1037,11 @@ proc ::safe::AliasLoad {slave file args} {
# static package loading
if {$package eq ""} {
set msg "load error: empty filename and no package name"
- Log $slave $msg
+ Log $child $msg
return -code error $msg
}
if {!$state(staticsok)} {
- Log $slave "static packages loading disabled\
+ Log $child "static packages loading disabled\
(trying to load $package to $target)"
return -code error "permission denied (static package)"
}
@@ -1050,23 +1050,23 @@ proc ::safe::AliasLoad {slave file args} {
# get the real path from the virtual one.
try {
- set file [TranslatePath $slave $file]
+ set file [TranslatePath $child $file]
} on error msg {
- Log $slave $msg
+ Log $child $msg
return -code error "permission denied"
}
# check the translated path
try {
- FileInAccessPath $slave $file
+ FileInAccessPath $child $file
} on error msg {
- Log $slave $msg
+ Log $child $msg
return -code error "permission denied (path)"
}
}
try {
- return [::interp invokehidden $slave load $file $package $target]
+ return [::interp invokehidden $child load $file $package $target]
} on error msg {
# Some packages return no error message.
set msg0 "load of binary library for package $package failed"
@@ -1075,18 +1075,18 @@ proc ::safe::AliasLoad {slave file args} {
} else {
set msg "$msg0: $msg"
}
- Log $slave $msg
+ Log $child $msg
return -code error $msg
}
}
# FileInAccessPath raises an error if the file is not found in the list of
-# directories contained in the (parent side recorded) slave's access path.
+# directories contained in the (parent side recorded) child's access path.
# the security here relies on "file dirname" answering the proper
# result... needs checking ?
-proc ::safe::FileInAccessPath {slave file} {
- namespace upvar ::safe [VarName $slave] state
+proc ::safe::FileInAccessPath {child file} {
+ namespace upvar ::safe [VarName $child] state
set access_path $state(access_path)
if {[file isdirectory $file]} {
@@ -1098,14 +1098,14 @@ proc ::safe::FileInAccessPath {slave file} {
# potential pathname anomalies.
set norm_parent [file normalize $parent]
- namespace upvar ::safe [VarName $slave] state
+ namespace upvar ::safe [VarName $child] state
if {$norm_parent ni $state(access_path,norm)} {
return -code error "\"$file\": not in access_path"
}
}
-proc ::safe::DirInAccessPath {slave dir} {
- namespace upvar ::safe [VarName $slave] state
+proc ::safe::DirInAccessPath {child dir} {
+ namespace upvar ::safe [VarName $child] state
set access_path $state(access_path)
if {[file isfile $dir]} {
@@ -1116,7 +1116,7 @@ proc ::safe::DirInAccessPath {slave dir} {
# potential pathname anomalies.
set norm_dir [file normalize $dir]
- namespace upvar ::safe [VarName $slave] state
+ namespace upvar ::safe [VarName $child] state
if {$norm_dir ni $state(access_path,norm)} {
return -code error "\"$dir\": not in access_path"
}
@@ -1125,16 +1125,16 @@ proc ::safe::DirInAccessPath {slave dir} {
# This procedure is used to report an attempt to use an unsafe member of an
# ensemble command.
-proc ::safe::BadSubcommand {slave command subcommand args} {
+proc ::safe::BadSubcommand {child command subcommand args} {
set msg "not allowed to invoke subcommand $subcommand of $command"
- Log $slave $msg
+ Log $child $msg
return -code error -errorcode {TCL SAFE SUBCOMMAND} $msg
}
# AliasEncoding is the target of the "encoding" alias in safe interpreters.
-proc ::safe::AliasEncoding {slave option args} {
- # Note that [encoding dirs] is not supported in safe slaves at all
+proc ::safe::AliasEncoding {child option args} {
+ # Note that [encoding dirs] is not supported in safe children at all
set subcommands {convertfrom convertto names system}
try {
set option [tcl::prefix match -error [list -level 1 -errorcode \
@@ -1145,15 +1145,15 @@ proc ::safe::AliasEncoding {slave option args} {
"wrong # args: should be \"encoding system\""
}
} on error {msg options} {
- Log $slave $msg
+ Log $child $msg
return -options $options $msg
}
- tailcall ::interp invokehidden $slave encoding $option {*}$args
+ tailcall ::interp invokehidden $child encoding $option {*}$args
}
# Various minor hiding of platform features. [Bug 2913625]
-proc ::safe::AliasExeName {slave} {
+proc ::safe::AliasExeName {child} {
return ""
}
@@ -1184,17 +1184,17 @@ proc ::safe::AliasExeName {slave} {
# fails.
# So we choose (a).
# (7) The command
-# namespace upvar ::safe S$slave state
+# namespace upvar ::safe S$child state
# becomes
-# namespace upvar ::safe [VarName $slave] state
+# namespace upvar ::safe [VarName $child] state
# ------------------------------------------------------------------------------
-proc ::safe::RejectExcessColons {slave} {
- set stripped [regsub -all -- {:::*} $slave ::]
+proc ::safe::RejectExcessColons {child} {
+ set stripped [regsub -all -- {:::*} $child ::]
if {[string range $stripped end-1 end] eq {::}} {
return -code error {interpreter name must not end in "::"}
}
- if {$stripped ne $slave} {
+ if {$stripped ne $child} {
set msg {interpreter name has excess colons in namespace separators}
return -code error $msg
}
@@ -1204,9 +1204,9 @@ proc ::safe::RejectExcessColons {slave} {
return
}
-proc ::safe::VarName {slave} {
- # return S$slave
- return S[string map {:: @N @ @A} $slave]
+proc ::safe::VarName {child} {
+ # return S$child
+ return S[string map {:: @N @ @A} $child]
}
proc ::safe::Setup {} {
@@ -1267,20 +1267,20 @@ namespace eval ::safe {
# Log command, set via 'setLogCmd'. Logging is disabled when empty.
variable Log {}
- # The package maintains a state array per slave interp under its
+ # The package maintains a state array per child interp under its
# control. The name of this array is S<interp-name>. This array is
# brought into scope where needed, using 'namespace upvar'. The S
- # prefix is used to avoid that a slave interp called "Log" smashes
+ # prefix is used to avoid that a child interp called "Log" smashes
# the "Log" variable.
#
# The array's elements are:
#
- # access_path : List of paths accessible to the slave.
+ # access_path : List of paths accessible to the child.
# access_path,norm : Ditto, in normalized form.
- # access_path,slave : Ditto, as the path tokens as seen by the slave.
+ # access_path,slave : Ditto, as the path tokens as seen by the child.
# access_path,map : dict ( token -> path )
# access_path,remap : dict ( path -> token )
- # tm_path_slave : List of TM root directories, as tokens seen by the slave.
+ # tm_path_slave : List of TM root directories, as tokens seen by the child.
# staticsok : Value of option -statics
# nestedok : Value of option -nested
# cleanupHook : Value of option -deleteHook
diff --git a/tests/ioCmd.test b/tests/ioCmd.test
index 8d961ae..898d076 100644
--- a/tests/ioCmd.test
+++ b/tests/ioCmd.test
@@ -2109,13 +2109,13 @@ test iocmd-32.2 {delete interp of reflected chan} {
# Bug 3034840
# Run this test in an interp with memory debugging to panic
# on the double free
- interp create slave
- slave eval {
+ interp create child
+ child eval {
proc no-op args {}
proc driver {sub args} {return {initialize finalize watch read}}
chan event [chan create read driver] readable no-op
}
- interp delete slave
+ interp delete child
} {}
# ### ### ### ######### ######### #########
diff --git a/tests/ioTrans.test b/tests/ioTrans.test
index 2872fbb..f185117 100644
--- a/tests/ioTrans.test
+++ b/tests/ioTrans.test
@@ -1244,16 +1244,16 @@ test iortrans-11.1 {origin interpreter of moved transform destroyed during acces
tempdone
} -result {Owner lost}
test iortrans-11.2 {delete interp of reflected transform} -setup {
- interp create slave
- # Magic to get the test* commands into the slave
- load {} Tcltest slave
+ interp create child
+ # Magic to get the test* commands into the child
+ load {} Tcltest child
} -constraints {testchannel} -body {
- # Get base channel into the slave
+ # Get base channel into the child
set c [tempchan]
testchannel cut $c
- interp eval slave [list testchannel splice $c]
- interp eval slave [list set c $c]
- slave eval {
+ interp eval child [list testchannel splice $c]
+ interp eval child [list set c $c]
+ child eval {
proc no-op args {}
proc driver {c sub args} {
return {initialize finalize read write}
@@ -1261,7 +1261,7 @@ test iortrans-11.2 {delete interp of reflected transform} -setup {
set t [chan push $c [list driver $c]]
chan event $c readable no-op
}
- interp delete slave
+ interp delete child
} -cleanup {
tempdone
} -result {}
diff --git a/tests/oo.test b/tests/oo.test
index 94537b7..43aa608 100644
--- a/tests/oo.test
+++ b/tests/oo.test
@@ -1370,16 +1370,16 @@ test oo-7.8 {OO: next at the end of the method chain} -setup {
} -result {foo2 foo 1 {no next method implementation}}
test oo-7.9 {OO: defining inheritance in namespaces} -setup {
set ::result {}
- oo::class create ::master
+ oo::class create ::parent
namespace eval ::foo {
- oo::class create mixin {superclass ::master}
+ oo::class create mixin {superclass ::parent}
}
} -cleanup {
- ::master destroy
+ ::parent destroy
namespace delete ::foo
} -body {
namespace eval ::foo {
- oo::class create bar {superclass master}
+ oo::class create bar {superclass parent}
oo::class create boo
oo::define boo {superclass bar}
oo::define boo {mixin mixin}
@@ -2066,18 +2066,18 @@ test oo-14.5 {OO and mixins and filters - advanced case} -setup {
mix destroy
} -result >>foobar<<
test oo-14.6 {OO and mixins of mixins - Bug 1960703} -setup {
- oo::class create master
+ oo::class create parent
} -cleanup {
- master destroy
+ parent destroy
} -body {
oo::class create A {
- superclass master
+ superclass parent
method egg {} {
return chicken
}
}
oo::class create B {
- superclass master
+ superclass parent
mixin A
method bar {} {
# mixin from A
@@ -2085,7 +2085,7 @@ test oo-14.6 {OO and mixins of mixins - Bug 1960703} -setup {
}
}
oo::class create C {
- superclass master
+ superclass parent
mixin B
method foo {} {
# mixin from B
@@ -2095,12 +2095,12 @@ test oo-14.6 {OO and mixins of mixins - Bug 1960703} -setup {
[C new] foo
} -result chicken
test oo-14.7 {OO and filters from mixins of mixins} -setup {
- oo::class create master
+ oo::class create parent
} -cleanup {
- master destroy
+ parent destroy
} -body {
oo::class create A {
- superclass master
+ superclass parent
method egg {} {
return chicken
}
@@ -2111,7 +2111,7 @@ test oo-14.7 {OO and filters from mixins of mixins} -setup {
}
}
oo::class create B {
- superclass master
+ superclass parent
mixin A
filter f
method bar {} {
@@ -2120,7 +2120,7 @@ test oo-14.7 {OO and filters from mixins of mixins} -setup {
}
}
oo::class create C {
- superclass master
+ superclass parent
mixin B
filter f
method foo {} {
@@ -2132,18 +2132,18 @@ test oo-14.7 {OO and filters from mixins of mixins} -setup {
} -result {(foo) (bar) (egg) chicken (egg) (bar) (foo)}
test oo-14.8 {OO: class mixin order - Bug 1998221} -setup {
set ::result {}
- oo::class create master {
+ oo::class create parent {
method test {} {}
}
} -cleanup {
- master destroy
+ parent destroy
} -body {
oo::class create mix {
- superclass master
+ superclass parent
method test {} {lappend ::result mix; next; return $::result}
}
oo::class create cls {
- superclass master
+ superclass parent
mixin mix
method test {} {lappend ::result cls; next; return $::result}
}
@@ -2778,13 +2778,13 @@ test oo-18.7 {OO: objdefine command support} -setup {
invoked from within
"oo::objdefine inst {rename ::inst ::INST;error foo}"}}
test oo-18.8 {OO: define/self command support} -setup {
- oo::class create master
- oo::class create ::foo {superclass master}
+ oo::class create parent
+ oo::class create ::foo {superclass parent}
} -body {
catch {oo::define foo {rename ::foo ::bar; self {error foobar}}} msg opt
dict get $opt -errorinfo
} -cleanup {
- master destroy
+ parent destroy
} -result {foobar
while executing
"error foobar"
@@ -2795,15 +2795,15 @@ test oo-18.8 {OO: define/self command support} -setup {
invoked from within
"oo::define foo {rename ::foo ::bar; self {error foobar}}"}
test oo-18.9 {OO: define/self command support} -setup {
- oo::class create master
+ oo::class create parent
set c [oo::class create now_this_is_a_very_very_long_class_name_indeed {
- superclass master
+ superclass parent
}]
} -body {
catch {oo::define $c {error err}} msg opt
dict get $opt -errorinfo
} -cleanup {
- master destroy
+ parent destroy
} -result {err
while executing
"error err"
@@ -2811,13 +2811,13 @@ test oo-18.9 {OO: define/self command support} -setup {
invoked from within
"oo::define $c {error err}"}
test oo-18.10 {OO: define/self command support} -setup {
- oo::class create master
- oo::class create ::foo {superclass master}
+ oo::class create parent
+ oo::class create ::foo {superclass parent}
} -body {
catch {oo::define foo {self {rename ::foo {}; error foobar}}} msg opt
dict get $opt -errorinfo
} -cleanup {
- master destroy
+ parent destroy
} -result {foobar
while executing
"error foobar"
@@ -2828,13 +2828,13 @@ test oo-18.10 {OO: define/self command support} -setup {
invoked from within
"oo::define foo {self {rename ::foo {}; error foobar}}"}
test oo-18.11 {OO: define/self command support} -setup {
- oo::class create master
- oo::class create ::foo {superclass master}
+ oo::class create parent
+ oo::class create ::foo {superclass parent}
} -body {
catch {oo::define foo {rename ::foo {}; self {error foobar}}} msg opt
dict get $opt -errorinfo
} -cleanup {
- master destroy
+ parent destroy
} -result {this command cannot be called when the object has been deleted
while executing
"self {error foobar}"
@@ -3457,12 +3457,12 @@ test oo-27.2 {variables declaration - object introspection} -setup {
info object variables foo
} -result {a b c}
test oo-27.3 {variables declaration - basic behaviour} -setup {
- oo::class create master
+ oo::class create parent
} -cleanup {
- master destroy
+ parent destroy
} -body {
oo::class create foo {
- superclass master
+ superclass parent
variable x!
constructor {} {set x! 1}
method y {} {incr x!}
@@ -3472,13 +3472,13 @@ test oo-27.3 {variables declaration - basic behaviour} -setup {
bar y
} -result 3
test oo-27.4 {variables declaration - destructors too} -setup {
- oo::class create master
+ oo::class create parent
set result bad!
} -cleanup {
- master destroy
+ parent destroy
} -body {
oo::class create foo {
- superclass master
+ superclass parent
variable x!
constructor {} {set x! 1}
method y {} {incr x!}
@@ -3503,12 +3503,12 @@ test oo-27.5 {variables declaration - object-bound variables} -setup {
foo y
} -result 2
test oo-27.6 {variables declaration - non-interference of levels} -setup {
- oo::class create master
+ oo::class create parent
} -cleanup {
- master destroy
+ parent destroy
} -body {
oo::class create foo {
- superclass master
+ superclass parent
variable x!
constructor {} {set x! 1}
method y {} {incr x!}
@@ -3523,12 +3523,12 @@ test oo-27.6 {variables declaration - non-interference of levels} -setup {
list [bar y] [lsort [info object vars bar]] [bar eval {info vars *!}]
} -result {{3 2 y! {}} {x! y!} {x! y!}}
test oo-27.7 {variables declaration - one underlying variable space} -setup {
- oo::class create master
+ oo::class create parent
} -cleanup {
- master destroy
+ parent destroy
} -body {
oo::class create foo {
- superclass master
+ superclass parent
variable x!
constructor {} {set x! 1}
method y {} {incr x!}
@@ -3555,12 +3555,12 @@ test oo-27.9 {variables declaration - error cases - arrays} -body {
oo::define oo::object variable bad(var)
} -returnCodes error -result {invalid declared variable name "bad(var)": must not refer to an array element}
test oo-27.10 {variables declaration - no instance var leaks with class resolvers} -setup {
- oo::class create master
+ oo::class create parent
} -cleanup {
- master destroy
+ parent destroy
} -body {
oo::class create foo {
- superclass master
+ superclass parent
variable clsvar
constructor {} {
set clsvar 0
@@ -3583,12 +3583,12 @@ test oo-27.10 {variables declaration - no instance var leaks with class resolver
list [inst1 value] [inst2 value]
} -result {3 2}
test oo-27.11 {variables declaration - no instance var leaks with class resolvers} -setup {
- oo::class create master
+ oo::class create parent
} -cleanup {
- master destroy
+ parent destroy
} -body {
oo::class create foo {
- superclass master
+ superclass parent
variable clsvar
constructor {} {
set clsvar 0
@@ -3656,12 +3656,12 @@ test oo-27.13 {variables declaration: Bug 3185009: require refcount management}
foo destroy
} -result {0 7 1 7 {} 0 1 {can't read "x": no such variable}}
test oo-27.14 {variables declaration - multiple use} -setup {
- oo::class create master
+ oo::class create parent
} -cleanup {
- master destroy
+ parent destroy
} -body {
oo::class create foo {
- superclass master
+ superclass parent
variable x
variable y
method boo {} {
@@ -3672,12 +3672,12 @@ test oo-27.14 {variables declaration - multiple use} -setup {
list [bar boo] [bar boo]
} -result {1,1 2,2}
test oo-27.15 {variables declaration - multiple use} -setup {
- oo::class create master
+ oo::class create parent
} -cleanup {
- master destroy
+ parent destroy
} -body {
oo::class create foo {
- superclass master
+ superclass parent
variable
variable x y
method boo {} {
@@ -3688,12 +3688,12 @@ test oo-27.15 {variables declaration - multiple use} -setup {
list [bar boo] [bar boo]
} -result {1,1 2,2}
test oo-27.16 {variables declaration - multiple use} -setup {
- oo::class create master
+ oo::class create parent
} -cleanup {
- master destroy
+ parent destroy
} -body {
oo::class create foo {
- superclass master
+ superclass parent
variable x
variable -clear
variable y
@@ -3705,12 +3705,12 @@ test oo-27.16 {variables declaration - multiple use} -setup {
list [bar boo] [bar boo]
} -result {1,1 1,2}
test oo-27.17 {variables declaration - multiple use} -setup {
- oo::class create master
+ oo::class create parent
} -cleanup {
- master destroy
+ parent destroy
} -body {
oo::class create foo {
- superclass master
+ superclass parent
variable x
variable -set y
method boo {} {
@@ -3721,12 +3721,12 @@ test oo-27.17 {variables declaration - multiple use} -setup {
list [bar boo] [bar boo]
} -result {1,1 1,2}
test oo-27.18 {variables declaration - multiple use} -setup {
- oo::class create master
+ oo::class create parent
} -cleanup {
- master destroy
+ parent destroy
} -body {
oo::class create foo {
- superclass master
+ superclass parent
variable x
variable -? y
method boo {} {
@@ -3824,12 +3824,12 @@ test oo-27.22 {variables declaration uniqueifies: Bug 3396896} -setup {
} -result {v t}
test oo-27.23 {variable resolver leakage: Bug 1493a43044} -setup {
oo::class create Super
- oo::class create Master {
+ oo::class create parent {
superclass Super
variable member1 member2
constructor {} {
- set member1 master1
- set member2 master2
+ set member1 parent1
+ set member2 parent2
}
method getChild {} {
Child new [self]
@@ -3850,10 +3850,10 @@ test oo-27.23 {variable resolver leakage: Bug 1493a43044} -setup {
method result {} {return $result}
}
} -body {
- [[Master new] getChild] result
+ [[parent new] getChild] result
} -cleanup {
Super destroy
-} -result {master1 master2 master1 master2 master1 master2 master1 master2}
+} -result {parent1 parent2 parent1 parent2 parent1 parent2 parent1 parent2}
# A feature that's not supported because the mechanism may change without
# warning, but is supposed to work...
diff --git a/tests/ooNext2.test b/tests/ooNext2.test
index 84a2bdd..0ec7cdd 100644
--- a/tests/ooNext2.test
+++ b/tests/ooNext2.test
@@ -882,9 +882,9 @@ test oo-call-3.4 {current call introspection: in destructors} -setup {
# caller
set testopts {
-setup {
- oo::class create Master
+ oo::class create Parent
oo::class create Foo {
- superclass Master
+ superclass Parent
method bar {} {
puts abc
tailcall puts hi
@@ -892,11 +892,11 @@ set testopts {
}
}
oo::class create Foo2 {
- superclass Master
+ superclass Parent
}
}
-cleanup {
- Master destroy
+ Parent destroy
}
}
diff --git a/tests/safe.test b/tests/safe.test
index eb4bfaf..b91da86 100644
--- a/tests/safe.test
+++ b/tests/safe.test
@@ -901,7 +901,7 @@ test safe-9.20 {check module loading} -setup {
{TCLLIB TESTSDIR/auto0/modules TESTSDIR/auto0/modules/mod1\
TESTSDIR/auto0/modules/mod2} -- res0 res1 res2}
# - The command safe::InterpSetConfig adds the parent's [tcl::tm::list] in
-# tokenized form to the slave's access path, and then adds all the
+# tokenized form to the child's access path, and then adds all the
# descendants, discovered recursively by using glob.
# - The order of the directories in the list returned by glob is system-dependent,
# and therefore this is true also for (a) the order of token assignment to
diff --git a/tests/socket.test b/tests/socket.test
index 4f1a198..5198f4f 100644
--- a/tests/socket.test
+++ b/tests/socket.test
@@ -1838,12 +1838,12 @@ proc transf_test {{testmode transfer} {maxIter 1000} {maxTime 10000}} {
}
}
tcltest::DebugPuts 1 "== test \[$::localhost\]:$port $testmode =="
- set ::master [thread::id]
- # helper thread creating async connection and initiating transfer (detach) to master:
+ set ::parent [thread::id]
+ # helper thread creating async connection and initiating transfer (detach) to parent:
set ::helper [thread::create]
thread::send -async $::helper [list \
- lassign [list $::master $::localhost $port $testmode] \
- ::master ::localhost ::port ::testmode
+ lassign [list $::parent $::localhost $port $testmode] \
+ ::parent ::localhost ::port ::testmode
]
thread::send -async $::helper {
set ::helper [thread::id]
@@ -1852,29 +1852,29 @@ proc transf_test {{testmode transfer} {maxIter 1000} {maxTime 10000}} {
if {"helper-writable" in $::testmode} {;# to test both sides during connect
fileevent $fd writable [list apply {{fd} {
if {[thread::id] ne $::helper} {
- thread::send -async $::master {set ::count "ERROR: invalid thread, $::helper is expecting"}
+ thread::send -async $::parent {set ::count "ERROR: invalid thread, $::helper is expecting"}
close $fd
return
}
}} $fd]
};#
thread::detach $fd
- thread::send -async $::master [list transf_master $fd {*}$args]
+ thread::send -async $::parent [list transf_parent $fd {*}$args]
}
iteration first
}
- # master proc commiting transfer attempt (attach) and checking acquire was successful:
- proc transf_master {fd args} {
+ # parent proc commiting transfer attempt (attach) and checking acquire was successful:
+ proc transf_parent {fd args} {
tcltest::DebugPuts 1 "** trma / $::count ** $args **"
thread::attach $fd
- if {"master-close" in $::testmode} {;# to test close during connect
+ if {"parent-close" in $::testmode} {;# to test close during connect
set ::count $::count
close $fd
return
};#
fileevent $fd writable [list apply {{fd} {
- if {[thread::id] ne $::master} {
- thread::send -async $::master {set ::count "ERROR: invalid thread, $::master is expecting"}
+ if {[thread::id] ne $::parent} {
+ thread::send -async $::parent {set ::count "ERROR: invalid thread, $::parent is expecting"}
close $fd
return
}
@@ -1902,7 +1902,7 @@ proc transf_test {{testmode transfer} {maxIter 1000} {maxTime 10000}} {
if {$srvsock ne {}} {close $srvsock}
if {[info exists ::helper]} {thread::release -wait $::helper}
tcltest::DebugPuts 1 "== stop / $::count =="
- unset -nocomplain ::count ::testmode ::master ::helper
+ unset -nocomplain ::count ::testmode ::parent ::helper
}
}
test socket_$af-13.2.tr1 {Testing socket transfer between threads during async connect} -body {
@@ -1912,12 +1912,12 @@ test socket_$af-13.2.tr2 {Testing socket transfer between threads during async c
transf_test {transfer helper-writable} 100
} -result 100 -constraints [list socket supported_$af thread]
test socket_$af-13.2.cl1 {Testing socket transfer between threads during async connect} -body {
- transf_test {master-close} 100
+ transf_test {parent-close} 100
} -result 100 -constraints [list socket supported_$af thread]
test socket_$af-13.2.cl2 {Testing socket transfer between threads during async connect} -body {
- transf_test {master-close helper-writable} 100
+ transf_test {parent-close helper-writable} 100
} -result 100 -constraints [list socket supported_$af thread]
-catch {rename transf_master {}}
+catch {rename transf_parent {}}
rename transf_test {}
# ----------------------------------------------------------------------