From baf0ba92063cd443bca3401facf7f966647dab72 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Tue, 13 May 2014 23:14:00 -0400 Subject: [PATCH] A process may have exited before it gets checked in step-children. --- minimart/core.rkt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/minimart/core.rkt b/minimart/core.rkt index 69d9bbe..49e39f1 100644 --- a/minimart/core.rkt +++ b/minimart/core.rkt @@ -264,8 +264,8 @@ #f ;; world is inert. (transition (for/fold ([w (struct-copy world w [runnable-pids (set)])]) [(pid (in-set runnable-pids))] - (define p (hash-ref (world-process-table w) pid)) - (apply-transition pid (deliver-event #f pid p) w)) + (define p (hash-ref (world-process-table w) pid (lambda () #f))) + (if (not p) w (apply-transition pid (deliver-event #f pid p) w))) '()))) ;; world needs another check to see if more can happen. (define (world-handle-event e w)