summaryrefslogtreecommitdiff
path: root/scsh-process.scm
diff options
context:
space:
mode:
authorPeter Bex <peter@more-magic.net>2012-10-06 20:48:10 +0200
committerPeter Bex <peter@more-magic.net>2012-10-06 20:48:10 +0200
commit5f370e9482edc40daeced290506d1b7155c5f96c (patch)
tree0d8be534370ae2ed28bb470e20ce76f3875b6d33 /scsh-process.scm
parent29057497d4eb3a5cf0efc79506b7376fa7cac290 (diff)
downloadscsh-process-5f370e9482edc40daeced290506d1b7155c5f96c.tar.gz
Fix order of returning0.3.1
Diffstat (limited to 'scsh-process.scm')
-rw-r--r--scsh-process.scm14
1 files 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