RUN-SYNCHRONOUS-PROCESS must close the SUBPROCESS-OUTPUT-CHANNEL after
authorChris Hanson <org/chris-hanson/cph>
Tue, 12 May 1992 02:43:41 +0000 (02:43 +0000)
committerChris Hanson <org/chris-hanson/cph>
Tue, 12 May 1992 02:43:41 +0000 (02:43 +0000)
all of the input region is written, otherwise the subprocess doesn't
know that there is no more data.  This was being done in the case
where the subprocess generated output, but not otherwise.

v7/src/edwin/process.scm

index 5b125515159c546d2652f0ac04df98ecf17479d7..d8a6862b1d69e7e0070c7779230de5b449444cdd 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/process.scm,v 1.23 1992/03/24 22:52:02 cph Exp $
+;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/process.scm,v 1.24 1992/05/12 02:43:41 cph Exp $
 ;;;
 ;;;    Copyright (c) 1991-92 Massachusetts Institute of Technology
 ;;;
@@ -530,10 +530,12 @@ after the listing is made.)"
                                 (loop)
                                 status)))))))
                 (begin
-                  (group-write-to-channel (region-group input-region)
-                                          (region-start-index input-region)
-                                          (region-end-index input-region)
-                                          (subprocess-output-channel process))
+                  (let ((channel (subprocess-output-channel process)))
+                    (group-write-to-channel (region-group input-region)
+                                            (region-start-index input-region)
+                                            (region-end-index input-region)
+                                            channel)
+                    (channel-close channel))
                   (subprocess-wait process)))))))
       (begin
        (channel-close (subprocess-output-channel process))