Form to run when process terminates.
An integer in the inclusive range
ensure-process-cleanup ensures that the cleanup-form is present for the process process. When process terminates, its cleanup forms are run. Cleanup forms can be functions of one argument (the process), or lists, in which case the
cl:car is applied to the process and the
cl:cdr of the list.
process is the process to watch for termination. By default, this is the value returned by get-current-process.
priority determines the execution order of the forms. Higher priority means later execution. The system uses values between 700000 and 900000 for cleanups that need to be last, and 0 for other cleanups. The default value of priority is 0.
force determines what to do if the same cleanup is already registered but with a different priority. When adding cleanup forms,
cl:equal to ensure that the form is only added once. If a cleanup already exists with the same priority,
ensure-process-cleanup just returns
nil, otherwise it acts according to force: if force is
nil it invokes an error, but if force is
ensure-process-cleanup removes the old entry before adding the new entry. The default value of force is
ensure-process-cleanupcan also be called like this:
(ensure-process-cleanup cleanup-form process)
LispWorks User Guide and Reference Manual - 13 Feb 2015