Commits

Peter Bex committed 3869259

Fix order of returning

  • Participants
  • Parent commits 83872d2
  • Tags 0.3.1

Comments (0)

Files changed (1)

File scsh-process.scm

                       (abort exn))
                   (receive (pid ok? status)
                     (posix-process-wait (and p (scsh-process-pid p)) nohang)
-                    (if (zero? pid)
-                        (begin (when p
-                                 (scsh-process-exit-status-set! p status)
-                                 (scsh-process-ok?-set! p ok?))
-                               (remove-scsh-pending-process! pid)
-                               (values status ok? pid))
-                        (values #f #f #f))))))))
+                    (cond
+                     ((zero? pid) (values #f #f #f))
+                     (else (when p
+                             (scsh-process-exit-status-set! p status)
+                             (scsh-process-ok?-set! p ok?))
+                           (remove-scsh-pending-process! pid)
+                           (values status ok? pid)))))))))
 
   (set-signal-handler!
    signal/chld