Killing a running process
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Killing a running process

From: al-s <stosh259@hotmail.com>
Date: Fri Mar 03 2006 - 16:53:04 CET

Hello group,

I run the following code which creates mutiple processes:

proc Run1 {command log} {
    set fd [open |$command]
    $log insert end $command\n
    fileevent $fd readable [list Log1 $fd $log]
    vwait done
  }

  proc Log1 {fd log} {
    if {[eof $fd]} {
      close $fd
      set done 1
      return
    }
    gets $fd line
    $log insert end $line\n
    $log see end
  }

How do I kill any running processes on the channel in use without
making globals? I would like to capture Control-c to be able to do
this in wish.

Thanks in advance

-Al
Received on Sun Apr 30 02:22:43 2006