[[document arguments of this [BLT] command]] Example of [stderr] capture: proc DisplayErrors { data } { puts "stderr> $data" } bgexec myVar -onerror DisplayErrors programName & Also has -onoutput. onerror sets up a callback so that when output appears on the stderr of programName, DisplayErrors is called with the string, and the proc can then do with it what it likes. onoutput sets up a similar callback, watching stdout of programName . ---- [gah] writes, "What I like about 'bgexec' is that it handles all the dumb stuff under the hood--so you (the Tcl programmer) don't have to worry about it. It automatically performs non-blocking I/O. It collects data at whatever rate, without you doing anything. It raises the programming problem from 'readable' events, non-blocking I/O, and buffer lengths, to Tcl variables and procedure calls. You don't have to be an expert in I/O or process semantics. If you want to kill the pipeline, all you have to do is set a variable. It's the same whether you're on Windows or Unix or MacOSX." [Vince] writes -- all wonderful reasons why this functionality really should go into Tcl's core.