From: Matt Birkholz Date: Fri, 5 Aug 2016 21:42:13 +0000 (-0700) Subject: edwin/process.scm (poll-process-for-output): allow for reading #f X-Git-Tag: mit-scheme-pucked-9.2.12~261^2~9 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=84df3910a549b8321321fd561b9d0f9b1ac771d3;p=mit-scheme.git edwin/process.scm (poll-process-for-output): allow for reading #f --- diff --git a/src/edwin/process.scm b/src/edwin/process.scm index 4f5bbf633..e19a40f6b 100644 --- a/src/edwin/process.scm +++ b/src/edwin/process.scm @@ -249,13 +249,14 @@ Initialized from the SHELL environment variable." (call-with-current-continuation (lambda (k) (bind-condition-handler (list condition-type:port-error) - (lambda (condition) condition (k #t)) + (lambda (condition) condition (k 'ERROR)) (lambda () (input-port/read-string! port input-buffer))))))) - (if (or (not (fixnum? n)) - (fix:= n 0)) + (if (or (eq? 'ERROR n) + (and (fixnum? n) (fix:= n 0))) (close-port port) - (output-substring process input-buffer n)) + (if (and (fixnum? n) (fix:> n 0)) + (output-substring process input-buffer n))) (and (fixnum? n) (fix:> n 0))))))