From 9cb58fc19c41816f33ffe210b39a1f734b4cb7c2 Mon Sep 17 00:00:00 2001 From: Peter Bex Date: Wed, 2 Jul 2025 14:22:19 +0200 Subject: Fix cleanup handling in wait for processes forked without scsh-process 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. --- scsh-process.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scsh-process.scm') 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! -- cgit v1.2.3