wyrm::unix::dup duplicated-channel [ replaced-channel ]
Duplicate a channel. If the second channel is specified, its file descriptor is replaced with the duplicated descriptor. Otherwise a new descriptor is created.
This command plays with file handles behind Tcl's back. Bufferring and other Tcl services can break and be broken by this. dup is intended more to rearrange files, with the channel names standing in for the file descriptors, prior to an exec rather than to duplicate channels within a process itself.