The predicate for whether the current process is cleaning up after being killed.
current-process-in-cleanup-p => result
The function current-process-in-cleanup-p returns true after the current process is killed. In particular, it returns true while the cleanups that were set by ensure-process-cleanup execute.
LispWorks User Guide and Reference Manual - 20 Sep 2017