TABLE OF CONTENTS
::pwtk::run_ids
SYNOPSIS
proc ::pwtk::run_ids {} {
PURPOSE
Return the IDs of all existing 'run -bg' background jobs.
A background job is considered existing if it was submitted by any among 'run* -bg' commands and was not yet monitored/waited by the ::pwtk::run_wait command, which removes it from the list of existing 'run -bg' jobs.
SOURCE
variable run if { ! [info exists run(bg.ID)] } { # there are no 'run -bg' background jobs return } set ids "" for {set id 1} {$id <= $run(bg.ID)} {incr id} { if { [info exists run(bg.PID,$id)] } { lappend ids $id } } return $ids }