Function
mp
ensure-process-cleanup cleanup-form &optional process =>
Form to run when process terminates.
The process to watch for termination. By default, this is the value ofmp:*current-process*.
car is applied to the process and thecdr of the list. equal to ensure that the form is only added once. add-process-dependent each time a dependent object is added to a process. When the process terminates,inform-dependent-of-dead-process is called on all dependent objects.
(defun add-process-dependent (dependent)
(mp:ensure-process-cleanup
'(delete-process-dependent ,dependent)))
(defun delete-process-dependent (process dependent)
(inform-dependent-of-dead-process dependent process))