Just wonder how to get exit status of pragram in tcl code
HI all,
I am trying to find out the exit status from other program in tcl program.
For example, in csh shell, the exit status is in the variable $status
#!/bin/csh -f
echo "Start "
<program>
echo "Status : $status"
exit
But for tcl program, I don't know how to find the exit status of the program, normally we use catch to find if the program is fail or not, but we don't know the exit status of the program. DO you know how to find it ?
if { [catch {exec <program>} message } {
puts "Error : <program> fail with message $message"
}
exit
|