quit should support an exit code
Describe the feature
(quit)
should allow specifying an exit code. This is useful to when
using cmucl as part of a script to signal that something bad happened
and have the shell or make or whatever have an easy way to know that.
Is there a prototype?
No prototype but to preserve backward compatibility we could define
(defun (quit &optional recklessy-p (exit-code 0))
...)
since the current code calls (unix:unix-exit 0)
and throws to
%end-of-the-world
with a value of 0.
Describe the feature in more detail
Currently, quit
has the optional arg recklessly-p
that will call
unix:unix-exit
with a code of 0. While the user can call
unix:unix-exit
directly to specify a code, it might be better to
have quit
take a code so that the *cleanup-functions*
are called.
A quick grep shows that only interface/interface.lisp
adds an entry
to *cleanup-functions*
.