Well, a couple of ideas come to mind. If you can use the
Blt extension, it provides a
bgexec command that is very well suited to this type of situation. Otherwise, about the only other reasonable way to do it in pure Tcl is to start the other program via a pipe, and then read the output of the program through the pipe. Once the program is finished, you'll get an EOF notification on the pipe.
For more information about these techniques, consult the Tcl'ers Wiki,
The
bgexec command is discussed briefly on the page "bgexec,"
and the Blt extension is described on the page "BLT,"
You can start learning about pipes at "pipeline,"
"Pipes vs Expect,"
also has some good information about this. - Ken Jones, President, ken@avia-training.com
Avia Training and Consulting,
866-TCL-HELP (866-825-4357) US Toll free
415-643-8692 Voice
415-643-8697 Fax