Can I find the exit status of a process using the PID

greenspun.com : LUSENET : Tool Command Language (Tcl) : One Thread

I am forking and running a separate tcl script in the background, so that I can kill it if it hangs. I need to know the exit status of the process, can I do this using the PID that it returns?

-- Tyler Gore (tyler.gore@analog.com), March 23, 2001

Answers

The status of the child process is encoded in $::errorCode. See

http://purl.org/thecliff/tcl/wiki/1039.html

for a complete description of how to decode $::errorCode after an [exec].

-- Larry W. Virden (lvirden@cas.org), March 28, 2001.


Moderation questions? read the FAQ