Change procedures that return a process status to return just the
authorChris Hanson <org/chris-hanson/cph>
Fri, 8 Mar 1991 03:13:36 +0000 (03:13 +0000)
committerChris Hanson <org/chris-hanson/cph>
Fri, 8 Mar 1991 03:13:36 +0000 (03:13 +0000)
status and not the exit reason.  Add new procedure
`subprocess-exit-reason' to get that information.

v7/src/runtime/process.scm
v7/src/runtime/runtime.pkg
v8/src/runtime/runtime.pkg

index 9a08847a4f42f8b7b38a541a4f984f12b44ad69d..edfc5eb45e99e7f138fee2066f7db065afd7070c 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/process.scm,v 1.7 1991/03/07 04:30:58 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/process.scm,v 1.8 1991/03/08 03:13:15 cph Exp $
 
 Copyright (c) 1989-91 Massachusetts Institute of Technology
 
@@ -195,17 +195,15 @@ MIT in each case. |#
          (else (convert-subprocess-status process status)))))))
 
 (define (convert-subprocess-status process status)
-  (let ((get-reason
-        (lambda (status)
-          (cons status
-                ((ucode-primitive process-reason 1)
-                 (subprocess-index process))))))
-    (case status
-      ((0) 'RUNNING)
-      ((1) (get-reason 'STOPPED))
-      ((2) (get-reason 'EXITED))
-      ((3) (get-reason 'SIGNALLED))
-      (else (error "Illegal process status:" status)))))
+  (case status
+    ((0) 'RUNNING)
+    ((1) 'STOPPED)
+    ((2) 'EXITED)
+    ((3) 'SIGNALLED)
+    (else (error "Illegal process status:" status))))
+
+(define (subprocess-exit-reason process)
+  ((ucode-primitive process-reason 1) (subprocess-index process)))
 
 (define (subprocess-job-control-status process)
   (let ((n
index 3195987bad5b3885b87dfbfbf746367a8f749a43..ebb85e33005c7aa1a38ae9778e661913c5fde58f 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/runtime.pkg,v 14.94 1991/03/07 04:31:16 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/runtime.pkg,v 14.95 1991/03/08 03:13:36 cph Exp $
 
 Copyright (c) 1988-91 Massachusetts Institute of Technology
 
@@ -1938,6 +1938,7 @@ MIT in each case. |#
          subprocess-continue-background
          subprocess-continue-foreground
          subprocess-delete
+         subprocess-exit-reason
          subprocess-filename
          subprocess-get
          subprocess-id
index 7ec993b5c02429fdba124f0e07fb77704fb0bc25..5c52436ecc6cef1ccb3387b38b2a6af9dc40779e 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/runtime.pkg,v 14.94 1991/03/07 04:31:16 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/runtime.pkg,v 14.95 1991/03/08 03:13:36 cph Exp $
 
 Copyright (c) 1988-91 Massachusetts Institute of Technology
 
@@ -1938,6 +1938,7 @@ MIT in each case. |#
          subprocess-continue-background
          subprocess-continue-foreground
          subprocess-delete
+         subprocess-exit-reason
          subprocess-filename
          subprocess-get
          subprocess-id