diff options
Diffstat (limited to 'scsh-process.scm')
-rw-r--r-- | scsh-process.scm | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/scsh-process.scm b/scsh-process.scm index b39543f..538c82d 100644 --- a/scsh-process.scm +++ b/scsh-process.scm @@ -108,12 +108,13 @@ (abort exn)) (receive (pid ok? status) (posix-process-wait (and p (scsh-process-pid p)) nohang) - (unless (zero? pid) - (when p - (scsh-process-exit-status-set! p status) - (scsh-process-ok?-set! p ok?)) - (remove-scsh-pending-process! pid)) - (values status ok? pid))))))) + (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)))))))) (set-signal-handler! signal/chld |