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

原文地址:https://www.cnblogs.com/greencolor/p/2048139.html