Destroyer

class Destroyer {
 inherit ::itk::Widget


   constructor {args} {
   }

   destructor {killFast}

   private method killFast {} {
      global errorInfo

      #check for an error message that is always there on clean shutdown
      if { [string first .help_shell $errorInfo] == -1 } {
         #print the last error
         puts $errorInfo
      }

      #kill this process with a strong kill signal.
      exec kill -9 [pid]
   }
}

posted @ 2011-05-16 22:04  greencolor  阅读(136)  评论(0编辑  收藏  举报