Fix thinko. Change definition of RUN-SYNCHRONOUS-PROCESS so that it
authorChris Hanson <org/chris-hanson/cph>
Fri, 29 Jan 1999 22:58:29 +0000 (22:58 +0000)
committerChris Hanson <org/chris-hanson/cph>
Fri, 29 Jan 1999 22:58:29 +0000 (22:58 +0000)
returns the exit code of the subprocess.

v7/src/runtime/syncproc.scm

index 10b08342c019440a2c7da23fd2c1eaaeceb6beee..bcd241eec091ea4ffde740fac7fea41fa81e34f0 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: syncproc.scm,v 1.1 1999/01/29 22:45:54 cph Exp $
+$Id: syncproc.scm,v 1.2 1999/01/29 22:58:29 cph Exp $
 
 Copyright (c) 1999 Massachusetts Institute of Technology
 
@@ -89,19 +89,19 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
                     environment))))
        (let loop ()
          (let* ((status (synchronous-process-wait process context))
-                (reason (subprocess-exit-reason process)))
+                (reason (subprocess-exit-reason process))
+                (p process))
            (subprocess-delete process)
            (set! process 'DELETED)
            (case status
              ((EXITED)
-              (if (not (eqv? 0 reason))
-                  (error:subprocess-exited process reason)))
+              reason)
              ((SIGNALLED)
-              (error:subprocess-signalled process reason))
+              (error:subprocess-signalled p reason))
              ((STOPPED)
-              (subprocess-kill process)
-              (subprocess-wait process)
-              (error:subprocess-stopped process reason))
+              (subprocess-kill p)
+              (subprocess-wait p)
+              (error:subprocess-stopped p reason))
              ((RUNNING)
               (loop))
              (else