[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Closing Synonum Streams.



Moon is right -- it certainly would make CLOSE a special case if it only
closed the synonym stream and not the target stream.  And we would have
to describe this "strange" behavior in CLtL.  However, I still think
closing synonym streams should NOT close the target streams.


And synonym streams aren't the only special case.  Broadcast, concatenated,
two-way, and echo streams should also not close the target streams.
Now a reasonable distinction emerges: indirect streams do not close their
target streams when they themselves are closed.

If these indirect streams do close their targets then you can never
close the stream created by DRIBBLE or you would surely end up closing
*TERMINAL-IO*.  "You" here means the system itself.

Program A may create a stream that program B wants to use indirectly
(e.g., as a synonym stream or perhaps a target of a broadcast stream
or what have you).  Certainly it is often the case that program B has
no right to close program A's stream just because B closes its own
indirect stream.

- Paul