[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: close queries
Date: Fri, 6 Sep 85 11:49:44 pdt
From: franz!jkf@Berkeley (John Foderaro)
From: David A. Moon <ucbkim!Moon@SCRC-STONY-BROOK.ARPA>
I don't see why close should be treated differently from other
I don't know what it would mean to "close the synonym stream but
not the stream
bound to" -- what aspect of a synonym stream is there to be
closed, other than the stream it is bound to?
I disagree. When a synonym stream is 'opened', it creates a conduit to
Since the function OPEN doesn't return synonym streams, it's difficult to
say what "a synonym stream is 'opened'" means exactly. I'd say
"a synonym stream is made'", since we make them by calling MAKE-SYNONYM-STREAM.
When it is closed, the only action should be
to close the conduit, preventing further reading and writing operations
through the synonym stream. This is completely safe. Closing down the
stream bound to the synonym stream can be unsafe and you are forced to
come up with rules like 'you can close *terminal-io*' which is something
processes wish to do on occasion in Unix.
This doesn't address my comment: I don't see why close should be treated
differently from other stream operations.
One way to decide which is the correct thing to do when a close is done
is to consider examples of synoynm streams. The only example I know of
is that *standard-input*, *standard-output*, *error-output*, *trace-output*,
*query-io*, and *debug-io* are all synonym streams for *terminal-io*.
It doesn't make sense to me that if I close *debug-io*, *standard-input*
should be affected, thus I claim this example supports my view.
If one adopts your suggestion that closing a synonym stream means to disconnect
it from the stream it forwards to, and prevent further operations on the
synonym stream, then surely closing *debug-io* is just as bad as closing
*terminal-io*. How you gonna debug it if *debug-io* doesn't work?
Let's look at it a different way: you propose for synonym streams to treat
CLOSE differently from all other stream operations. Okay, they could do that.
What would be gained by introducing this extra complexity, other than an
extra page of thickness of the manual?