Thank you for the help. I simply did "puts [catch {exec test #}]", which always gave 0. Unfortunately for me, Cygwin has a binary in /usr/bin/ called test. Even local directory "./test" didn't work, but absolute paths worked just fine.
Thanks again!
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.