Hello,
Simple C program, compiled:
int main(int argc, char** argv) { return atoi(argv[1]); }
The program returns the first parameter as its exit code. How can I launch this program in Tcl and retrieve that exit code?
I tried:
puts [catch {exec program 0}]
but that always shows 0. Any ideas?
Thanks.
Simple C program, compiled:
int main(int argc, char** argv) { return atoi(argv[1]); }
The program returns the first parameter as its exit code. How can I launch this program in Tcl and retrieve that exit code?
I tried:
puts [catch {exec program 0}]
but that always shows 0. Any ideas?
Thanks.