TABLE OF CONTENTS


::pwtk::remote_get

SYNOPSIS

proc ::pwtk::remote_get {key {id ""}} {

PURPOSE

Get the requested info of the background remote process.

ARGUMENTS

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 ""    
}