[Ecls-list] Cleaner ECL exit
Goffioul Michael
goffioul at imec.be
Thu Jun 29 09:15:39 UTC 2006
For the moment, QUIT simply calls exit() function and the exit hooks
(called from cl_shutdown) are executed in a special state, which does
not correspond to normal program execution. I'm currently dealing with
COM communication under Win32 and my exit hook simply hangs in that
state (the exit hooks just tries to uninitialize the COM library, which
starts a local message dispatching loop, but I guess that this fails
in this special state).
As a cleaner exit, would it be imaginable to implement QUIT as:
(defun quit (&optional (exit-code 0))
(throw (first (last si::*quit-tags*)) exit-code))
This would allow the execution of cl_shutdown() in a normal state. You
can then keep the atexit(cl_shutdown) call for abnormal program
termination.
Michael.
More information about the ecl-devel
mailing list