master: Remove closed processes from *active-processes*

stassats via Sbcl-commits <[email protected]>
Newsgroups gmane.lisp.steel-bank.cvs
Message-ID <[email protected]>
The branch "master" has been updated in SBCL:
       via  4e76fe5eb0488c607d3f646088eced8c2648f46b (commit)
      from  656925b3b1c634ad53e0295c6c2fe19c356802c0 (commit)

- Log -----------------------------------------------------------------
commit 4e76fe5eb0488c607d3f646088eced8c2648f46b
Author: Stas Boukarev <[email protected]>
Date:   Mon Apr 13 05:56:27 2026 +0300

    Remove closed processes from *active-processes*
---
 src/code/run-program.lisp | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/src/code/run-program.lisp b/src/code/run-program.lisp
index 2b8a32699..8bc906c65 100644
--- a/src/code/run-program.lisp
+++ b/src/code/run-program.lisp
@@ -363,16 +363,16 @@ should not be used."
                          ;; race with the SIGCHLD signal handler.
                          (multiple-value-bind (status code core)
                              (waitpid (process-pid proc))
-                           (when (and status
-                                      (not (process-closed-p proc)))
-                             (wake-serve-event proc)
-                             (setf (process-%status proc) status)
-                             (setf (process-%exit-code proc) code)
-                             (when (process-status-hook proc)
-                               (push proc changed))
-                             (when (member status '(:exited :signaled))
-                               (setf (process-core-dumped proc) core)
-                               t))))
+                           (when status
+                             (unless (process-closed-p proc)
+                               (wake-serve-event proc)
+                               (setf (process-%status proc) status)
+                               (setf (process-%exit-code proc) code)
+                               (when (process-status-hook proc)
+                                 (push proc changed))
+                               (setf (process-core-dumped proc) core))
+                             (and (member status '(:exited :signaled))
+                                  t))))
                        #+win32
                        (lambda (proc)
                          (let ((handle (process-handle proc)))
@@ -395,7 +395,8 @@ should not be used."
     ;; but in the Windows implementation it would be deeply bad.
     (dolist (proc changed)
       (let ((hook (process-status-hook proc)))
-        (funcall hook proc)))))
+        (when hook
+          (funcall hook proc))))))
 
 ;;;; RUN-PROGRAM and close friends
 

-----------------------------------------------------------------------


hooks/post-receive
-- 
SBCL
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.