home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1997 November
/
PCWorld_1997-11_cd.bin
/
software
/
programy
/
komix
/
DATA.Z
/
clwatchdog.tcl
< prev
next >
Wrap
Text File
|
1996-10-17
|
2KB
|
70 lines
#---------------------------------------------------------------------------
#
# (c) Cadre Technologies Inc. 1996
#
# File: @(#)clwatchdog.tcl /main/hindenburg/1
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)clwatchdog.tcl /main/hindenburg/1 17 Oct 1996 Copyright 1996 Cadre Technologies Inc.
# Start user added include file section
# End user added include file section
Class ClWatchdog : {Object} {
constructor
method destructor
method escape
method execute
attribute interp
attribute script
attribute endScript
}
constructor ClWatchdog {class this name} {
set this [Object::constructor $class $this $name]
# Start constructor user section
# End constructor user section
return $this
}
method ClWatchdog::destructor {this} {
# Start destructor user section
# End destructor user section
}
method ClWatchdog::escape {this cmd} {
if $win95 {
return $cmd
}
set sn $cmd
if {[regsub -all {\$} $sn {\\$} snn]} {set sn $snn}
return $sn
}
method ClWatchdog::execute {this} {
if {! [isRunning [$this interp] 1]} {
return 1
}
send -async [$this interp] {$wmttoolObj watchdogBusy 1}
if [catch {set returnValue [system [$this escape [$this script]]]} msg] {
wmtkerror $msg
set returnValue 1
}
send [$this interp] \
[concat {$wmttoolObj exitStatusList} [list $returnValue]]
if {"[$this endScript]" != ""} {
send -async [$this interp] [list eval [$this endScript]]
}
send -async [$this interp] {$wmttoolObj watchdogBusy 0}
$this delete
return $returnValue
}
# Do not delete this line -- regeneration end marker