From 458231d178c7c98798c653f574b6aab839637bc1 Mon Sep 17 00:00:00 2001 From: Raymond Toy <toy.raymond@gmail.com> Date: Thu, 28 Aug 2014 20:03:24 -0700 Subject: [PATCH] If a process is not schedulable because it has no run-reasons and/or an arrest-reason, destroy-process doesn't take effect. Destroy-process sets process-state to :active to try to ensure it gets the interrupt, but it also needs to clear process-%arrest-reasons and push something on process-%run-reasons. Patch from Paul Foley. --- src/code/multi-proc.lisp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/code/multi-proc.lisp b/src/code/multi-proc.lisp index 4e2b1bcd7..c73f0b41a 100644 --- a/src/code/multi-proc.lisp +++ b/src/code/multi-proc.lisp @@ -1044,7 +1044,9 @@ (process-interrupts process)) ;; Ensure that the process is active so that it can accept this ;; interrupt. - (setf (process-state process) :active))) + (setf (process-state process) :active + (process-%arrest-reasons process) nil) + (push :destroyed (process-%run-reasons process)))) ;; Should we wait until it's dead? (process-yield)) -- GitLab