DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Creating an SCO Visual Tcl program -- an overview

Displaying the process list (GetPsList)

  proc GetPsList {} {

set psOut [exec /bin/ps -u [id user] -o pid -o comm]

set psOut [split $psOut "\n"]

lvarpop psOut

return $psOut }

The GetPSList procedure:

  1. runs a ps on the current user, using the exec(TCL) command, then stores the list in the variable psOut

  2. puts the results in a readable list using split(TCL)

  3. strips the header from the list using lvarpop(TCL) to pop the title off the top of the list

  4. returns the list

Next topic: Completed kill program
Previous topic: Updating the process list (DoRefresh)

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003