First page Back Continue Last page Overview Image
8.6 Channels & Files – chan pipe
[304] chan pipe – Origin is TclX
Create an OS pipe, return both endpoints.
Helpful to separate stdout and stderr of a command pipeline
chan pipe readFromErr writeToErr
set stdout [open "|cmd args 2>@ $writeToErr" r]
fileevent $stdout readable got_stdout
fileevent $readFromErr readable got_stderr