From 5f370e9482edc40daeced290506d1b7155c5f96c Mon Sep 17 00:00:00 2001 From: Peter Bex Date: Sat, 6 Oct 2012 20:48:10 +0200 Subject: Fix order of returning --- scsh-process.scm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scsh-process.scm b/scsh-process.scm index 538c82d..7debdee 100644 --- a/scsh-process.scm +++ b/scsh-process.scm @@ -108,13 +108,13 @@ (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 -- cgit v1.2.3