From ed0abb26da3b724a73b76ad31513eaba3b0cac6e Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Sun, 30 Jul 2017 15:39:21 -0700 Subject: [PATCH] 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. --- src/runtime/binary-port.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 -- 2.25.1