TABLE OF CONTENTS
::pwtk::remote_get
SYNOPSIS
proc ::pwtk::remote_get {key {id ""}} {
PURPOSE
Get the requested info of the background remote process.
ARGUMENTS
- key -- a "key" for the info to query, possibilities are ID, PID, user_at_host, script, log, rdir, and rpwtk
- id -- (optional, default = 'id' of the last remote job) ID of the remote background process (PWTK assigns a unique ID to each background remote process)
If the 'id' argument is omitted, the requested 'key' of the last submitted background remote job is returned.
SOURCE
variable remote if { $id eq "" && [info exists remote(ID)] } { set id $remote(ID) } if { [info exists remote(ident,$id)] } { set ident $remote(ident,$id) if { [info exists remote($key,$ident)] } { return $remote($key,$ident) } else { set keys [join [regsub -all ,$ident [array names remote *,$ident] {}] {, }] ::pwtk::error "wrong key '$key', must be one of $keys" ::error {} "from ..." } } return "" }