aboutsummaryrefslogtreecommitdiff
path: root/tclcompat.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'tclcompat.tcl')
-rw-r--r--tclcompat.tcl7
1 files changed, 2 insertions, 5 deletions
diff --git a/tclcompat.tcl b/tclcompat.tcl
index 262aae8..8559edc 100644
--- a/tclcompat.tcl
+++ b/tclcompat.tcl
@@ -162,11 +162,9 @@ proc popen {cmd {mode r}} {
}
# A wrapper around 'pid' which can return the pids for 'popen'
-if {[info commands pid] ne ""} {
-rename pid .pid
-proc pid {{chan {}}} {
+local proc pid {{chan {}}} {
if {$chan eq ""} {
- tailcall .pid
+ tailcall upcall pid
}
if {[catch {$chan tell}]} {
return -code error "can not find channel named \"$chan\""
@@ -176,7 +174,6 @@ proc pid {{chan {}}} {
}
return $pids
}
-}
# try/on/finally conceptually similar to Tcl 8.6
#