[imp-hackers] cl-ext:exit

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Thu Jul 2 15:26:02 UTC 2009


On Thu, Jul 2, 2009 at 4:32 PM, Sam Steingold<sds at gnu.org> wrote:
> On Thu, Jul 2, 2009 at 2:32 AM, Juan Jose
> Garcia-Ripoll<juanjose.garciaripoll at googlemail.com> wrote:
>> Could we introduce also the notion of "finalizers" or things to be
>> done before exiting, perhaps in the form of a special variable with a
>> list of handlers? QUIT then would have to take an additional option,
>> deciding whether to honor or not those handlers.
>
> http://clisp.podval.org/impnotes/custom-init-fini.html#fini-hooks
>
> 31.1.3. Customizing Termination
>
> CUSTOM:*FINI-HOOKS* is run like this:
>
> (MAPC #'FUNCALL CUSTOM:*FINI-HOOKS*)

ECL's EXT:*EXIT-HOOKS* does the same, but first the point is not so
much showing that my implementation does this, but agreeing in a
reasonable naming and functionality beyond current hacks. For
instance, is there a way to exit without calling the exit hooks? Does
it make sense to add that functionality to QUIT? Should exit hooks
really reside in a special variable? What about then with accidental
thread local bindings? Or if a user cleans up the variable?

Juanjo

-- 
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com




More information about the implementation-hackers mailing list