When TEST-FOR-IO-ON-CHANNEL returns HANGUP or ERROR, call
authorChris Hanson <org/chris-hanson/cph>
Thu, 23 Jan 2003 02:53:22 +0000 (02:53 +0000)
committerChris Hanson <org/chris-hanson/cph>
Thu, 23 Jan 2003 02:53:22 +0000 (02:53 +0000)
CHANNEL-READ/CHANNEL-WRITE just as if it had returned an I/O-available
result.

v7/src/runtime/io.scm

index c1ed87470488fab11de6284f2bf96492abdb429d..fd761309c54bd89026383ab27b5e5e1c1dc399f3 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: io.scm,v 14.70 2003/01/22 20:30:25 cph Exp $
+$Id: io.scm,v 14.71 2003/01/23 02:53:22 cph Exp $
 
 Copyright 1986,1987,1988,1990,1991,1993 Massachusetts Institute of Technology
 Copyright 1994,1995,1998,1999,2000,2001 Massachusetts Institute of Technology
@@ -244,8 +244,7 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
                   (lambda (k)
                     (let ((result (test-for-io-on-channel channel 'READ)))
                       (case result
-                        ((READ) (do-read))
-                        ((HANGUP ERROR) 0)
+                        ((READ HANGUP ERROR) (do-read))
                         ((PROCESS-STATUS-CHANGE)
                          (handle-subprocess-status-change)
                          (if (channel-closed? channel) 0 (k)))
@@ -273,8 +272,7 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
                   (lambda (k)
                     (let ((result (test-for-io-on-channel channel 'WRITE)))
                       (case result
-                        ((WRITE) (do-write))
-                        ((HANGUP ERROR) 0)
+                        ((WRITE HANGUP ERROR) (do-write))
                         ((PROCESS-STATUS-CHANGE)
                          (handle-subprocess-status-change)
                          (if (channel-closed? channel) 0 (k)))