process-kill
works by interrupting the process. Therefore the kill will happen only when the process is processing interrupts. If
process-kill
is called while the process is in a no-interrupt context, the killing will actually happen when the process exits that no-interrupt context.
unwind-protect
, it may terminate a cleanup in the middle. It is possible to protect against this by doing all cleanups with interrupts disallowed, but that is not easy. Thus
process-kill
may be problematic, and should be avoided when possible. Whenever possible, make your processes check some flag that can be set by other threads and exit when the flag is set to some value.LispWorks User Guide and Reference Manual - 21 Dec 2011