diff options
author | Peter Bex <peter@more-magic.net> | 2025-05-02 09:18:05 +0200 |
---|---|---|
committer | Peter Bex <peter@more-magic.net> | 2025-05-02 09:18:05 +0200 |
commit | 6785fa1fc13bcdcaf0bc61d4ee4e0454cba8b154 (patch) | |
tree | 09a63f60d0d5765f616d75d93f486eb9fc124ca3 /scsh-process.scm | |
parent | e520d20700e513d69c5c83a03b48d89f4194fe63 (diff) | |
download | scsh-process-1.6.1.tar.gz |
Return 0 from original process-wait if the process is still running1.6.1
Diffstat (limited to 'scsh-process.scm')
-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) |