[imp-hackers] cl-ext:exit

Raymond Toy raymond.toy at stericsson.com
Thu Jul 2 15:34:33 UTC 2009


Brian Mastenbrook wrote:
> On Jul 2, 2009, at 9:32 AM, Sam Steingold 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*)
>>     
>
>
> SBCL's interface is very similar:
>
> http://www.sbcl.org/manual/Initialization-and-Exit-Hooks.html
>
> — Variable: sb-ext:*exit-hooks*
> This is a list of functions which are called in an unspecified order  
> when sbcl process exits. Unused by sbcl itself: reserved for user and  
> applications. Using (QUIT :recklessly-p T), or calling exit(3)  
> directly will circumvent these hooks.
>   

Perhaps a bit off-topic, bug having never used any kind of exit hook,
I'd like to know what people actually use them for.  What do you use the
exit hooks for?

Ray





More information about the implementation-hackers mailing list