A generalized boolean.
A positive integer or
An output stream designator.
A generalized boolean.
:dll-exportsor by deliver with
dll-quit sets up the internal state such that just before returning into its caller in the LispWorks dynamic library it causes LispWorks to quit. After quitting the callback returns as normal. The library can be unloaded using
FreeLibrary, or you can re-use it (without re-loading).
By default kill-all-processes is
nil which means that, if there are other running processes,
dll-quit just returns
nil. If kill-all-processes is non-nil,
dll-quit tries to kill all the other processes, and if it succeeds, it quits.
dll-quit should be called when no other processes are running, whether they were created by a callback or by process-run-function. If such processes exist, by default
dll-quit does nothing and returns
nil. If force is non-nil,
dll-quit always tries to set LispWorks up for quitting. LispWorks will quit even after a failure to kill all other processes and complete any required shut down operations. A true value of force automatically implies kill-all-processes true. However, if any of the other processes is stuck in a foreign call, the quitting may fail to finish properly. The default value of force is
If output is supplied,
dll-quit generates output if it is called when other processes are still running, or a required shut down operation was not completed. output can be an output stream,
t (interpreted as
nil. If output is
dll-quit collects the output and returns it as second argument quit-output. Otherwise it writes the output to the stream and quit-output is
The output contains a list of the other processes that are still running. If kill-all-processes or force was supplied, and killing the other processes failed, the output also contains backtraces of the other processes, and possibly other debugging information.
dll-quitis intended for use when a LispWorks dynamic library is loaded by a main process which you (the LispWorks programmer) do not control. If you control the main process, then use QuitLispWorks instead.
It is expected that the main process will call into the dynamic library with some "shutdown" call, and then calls
FreeLibrary to free the library. The shutdown call should close and free everything that needs to be closed or freed, call
dll-quit, and return.
dll-quitis supported only where LispWorks can be a dynamic library. Currently this is in LispWorks on Microsoft Windows, Intel Macintosh, Linux, x86/x64 Solaris and FreeBSD.
LispWorks User Guide and Reference Manual - 20 Sep 2017