fix getting killed by SIGTERM

This commit is contained in:
zimoch
2015-08-28 14:18:51 +00:00
parent e43909d1b2
commit 5961408c25

View File

@@ -32,8 +32,8 @@ set timeout -1
regsub -all {\$} {shellbox by Dirk Zimoch
$Source: /cvs/G/EPICS/App/scripts/shellbox.tcl,v $
$Revision: 1.11 $
$Date: 2015/04/02 09:42:20 $} {} version
$Revision: 1.12 $
$Date: 2015/08/28 14:18:51 $} {} version
proc usage {} {
puts "usage: shellbox \[options\] port command args"
@@ -204,6 +204,7 @@ if {![regexp {^[0-9]+$} $port] || [llength $command] == 0} {
}
fconfigure stdout -buffering none
trap {killProgram; exit} {SIGTERM}
startProgram
createServer $port
vwait forever