summaryrefslogtreecommitdiff
path: root/scsh-process.scm
diff options
context:
space:
mode:
authorPeter Bex <peter@more-magic.net>2025-07-02 14:22:19 +0200
committerPeter Bex <peter@more-magic.net>2025-07-02 14:22:19 +0200
commit9cb58fc19c41816f33ffe210b39a1f734b4cb7c2 (patch)
treec427ec4609f0a8e23b494850f58006a840adea44 /scsh-process.scm
parent31ae05553edd6d1c338f0f67d083397935825ca5 (diff)
downloadscsh-process-9cb58fc19c41816f33ffe210b39a1f734b4cb7c2.tar.gz
Fix cleanup handling in wait for processes forked without scsh-process1.6.2
The and-let* code assumed that if p was false, it would have a "pending-before" procedure. Unfortunately, this assumption only holds when the process would've been forked using "fork" from the scsh-process egg. If one forked with the "core" fork from CHICKEN itself, both p and pending-before would be false, which would lead to a "call of non-procedure: #f" error. Reported by Matthew Welland.
Diffstat (limited to 'scsh-process.scm')
-rw-r--r--scsh-process.scm2
1 files changed, 1 insertions, 1 deletions
diff --git a/scsh-process.scm b/scsh-process.scm
index b3f7fd1..d54f162 100644
--- a/scsh-process.scm
+++ b/scsh-process.scm
@@ -178,7 +178,7 @@
(scsh-process-ok? p)
(scsh-process-pid p))))))
(else
- (and-let* ((p (or p (pending-before pid))))
+ (and-let* ((p (or p (and pending-before (pending-before pid)))))
(scsh-process-exit-status-set! p status)
(scsh-process-ok?-set! p ok?)
(condition-variable-broadcast!