Changeset 5982 for branches/1.4/lang/tcl
- Timestamp:
- Feb 9, 2016, 8:26:30 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.4/lang/tcl/scripts/task.tcl
r5981 r5982 19 19 20 20 itcl::class Rappture::Task { 21 private method GetSignal { signal } 22 21 23 public variable logger "" 22 24 public variable jobstats Rappture::Task::MiddlewareTime … … 117 119 } 118 120 return "" 121 } 122 123 itcl::body Rappture::Task::GetSignal {code} { 124 set signals { 125 HUP INT QUIT ILL TRAP ABRT BUS FPE KILL USR1 SEGV 126 USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN 127 TTOU URG XCPU XFSZ VTALRM PROF WINCH POLL PWR SYS 128 RTMIN RTMIN+1 RTMIN+2 RTMIN+3 RTMAX-3 RTMAX-2 RTMAX-1 RTMAX 129 } 130 set sigNum [expr $code - 128] 131 if { $sigNum > 0 && $sigNum < [llength $signals] } { 132 return [lindex $signals $sigNum] 133 } 134 return "unknown exit code \"$code\"" 119 135 } 120 136 … … 293 309 # invalid result from the program. Append the stderr 294 310 # from the program to the message. 295 set logmesg "Program finished: exit code is $code" 311 if {$code > 128} { 312 set logmesg "Program signaled: signal was [GetSignal]" 313 } else { 314 set logmesg "Program finished: exit code is $code" 315 } 296 316 set result "$logmesg\n\n$::Rappture::Task::job(error)" 297 317 } elseif { $token == "abort" } {
Note: See TracChangeset
for help on using the changeset viewer.