OriginalBugID: 1429 RFE
The Tcl Channel model is a useful abstraction, that effectively tries to
wipe out many OS peculiarities. However, the particular case of
"bidirectional" channels (e.g. pipes in "r+" mode) is somewhat tricky:
in this case a single channel hides *two* OS-level descriptors/handles.
The problem is that most configuration operations apply to both
simultaneously, which is not always wanted.
For example, [fconfigure -blocking 0] cannot be told to only the write
side of an r+ pipe. Also, as already noted on clt, you cannot close only
the write side, so that the child gets an EOF, then listen to its last
words on the read side: both are closed at the same time. A slightly
different case is that of sockets, which are indeed made of a single
bidirectional descriptor. Still, it would be very useful (for the same
reasons) to be able to issue a half-close, as is possible with the
Proposed unified syntax for this extension: a "-readside/-writeside"
option to the [close] and [fconfigure] commands.
5339 discusses the separation of r/w for close.
-- 05/04/2000 hobbs