You can return a process exit status to the Operating System when LispWorks or a delivered LispWorks application quits.
Do this by passing a status value to the function quit. For example:
(quit :status 42)
LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:24