From: Matt Birkholz Date: Sun, 30 Jul 2017 22:39:21 +0000 (-0700) Subject: runtime/binary-port (close-binary-output-port): Close output chan. X-Git-Tag: mit-scheme-pucked-9.2.12~14^2~34 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=ed0abb26da3b724a73b76ad31513eaba3b0cac6e;p=mit-scheme.git runtime/binary-port (close-binary-output-port): Close output chan. 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. --- diff --git a/src/runtime/binary-port.scm b/src/runtime/binary-port.scm index 785e0c550..6d544e5b6 100644 --- a/src/runtime/binary-port.scm +++ b/src/runtime/binary-port.scm @@ -255,8 +255,8 @@ USA. (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) @@ -266,8 +266,8 @@ USA. (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))))) ;;;; Positioning