Close-binary-output-port was not closing the output channel of a
binary IO port when input and output channels were not the same
(e.g. when the port is the IO of a subprocess). Close-binary-input-
port seemed to have the same thinko.
(if (and ic
(let ((ob (port-output-buffer port)))
(or (not ob)
- (and (eqv? ic (buffer-channel ob))
- (buffer-marked-closed? ob)))))
+ (not (eqv? ic (buffer-channel ob)))
+ (not (buffer-marked-closed? ob)))))
(channel-close ic)))))
(define (close-binary-output-port port)
(if (and oc
(let ((ib (port-input-buffer port)))
(or (not ib)
- (and (eqv? oc (buffer-channel ib))
- (buffer-marked-closed? ib)))))
+ (not (eqv? oc (buffer-channel ib)))
+ (not (buffer-marked-closed? ib)))))
(channel-close oc)))))
\f
;;;; Positioning