diff options
-rw-r--r-- | scsh-process.scm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scsh-process.scm b/scsh-process.scm index af3586e..b3f7fd1 100644 --- a/scsh-process.scm +++ b/scsh-process.scm @@ -124,7 +124,11 @@ (let ((posix-process-wait process-wait)) (set! process-wait (lambda (#!optional pid nohang) - (receive (status ok? pid) (wait pid nohang) (values pid ok? status)))) + (receive (status ok? pid) (wait pid nohang) + ;; NOTE: If nohang is true, if the pid returned by + ;; posix-process-wait is zero, our implementation will + ;; return #f. This emulates the original behaviour: + (values (or pid 0) ok? status)))) (set! wait (lambda (#!optional pid-or-process nohang) |