Commit 498d13e3 authored by Elias Pipping's avatar Elias Pipping Committed by Robert Goldman
Browse files

Signal 'not-implemented-error as early as possible

If the function is not implemented, the :exited/:signaled distinction
does not work anyway
parent 9d1e1fa7
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -278,13 +278,13 @@ MAKE-INSTANCE. Primarily, it is being made available to enable type-checking."))
      (not-implemented-error 'process-info-pid)))

  (defun %process-status (process-info)
    #-(or allegro clozure cmucl ecl lispworks mkcl sbcl scl)
    (not-implemented-error '%process-status)
    (if-let (exit-code (slot-value process-info 'exit-code))
      (return-from %process-status
        (if-let (signal-code (slot-value process-info 'signal-code))
          (values :signaled signal-code)
          (values :exited exit-code))))
    #-(or allegro clasp clozure cmucl ecl lispworks mkcl sbcl scl)
    (not-implemented-error '%process-status)
    (if-let (process (slot-value process-info 'process))
      (multiple-value-bind (status code)
          (progn
@@ -725,4 +725,3 @@ could block because its output buffers are full."
           ;; returns (io err pid) of which we keep io.
           (t (prop 'process io-or-pid)))))
     process-info)))