From e969400e702064ecb46229b527d2a8085ac15011 Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Fri, 10 Jul 2015 12:45:51 -0700 Subject: [PATCH] Prune subprocess event registrations after exited/signalled. --- src/runtime/thread.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/runtime/thread.scm b/src/runtime/thread.scm index 882e00280..4f84ba77d 100644 --- a/src/runtime/thread.scm +++ b/src/runtime/thread.scm @@ -1085,7 +1085,13 @@ USA. (subprocess-registration/thread registration) (and event (lambda () (event status)))) (set-subprocess-registration/status! registration status))))) - subprocess-registrations)) + subprocess-registrations) + (set! subprocess-registrations + (filter! (lambda (registration) + (let ((status (subprocess-registration/status registration))) + (not (or (eq? status 'EXITED) + (eq? status 'SIGNALLED))))) + subprocess-registrations))) ;;;; Timer Events -- 2.25.1