[Openmcl-devel] Signal handling

Gary Byers gb at clozure.com
Mon Apr 12 15:34:34 PDT 2010

On Mon, 12 Apr 2010, Kevin Raison wrote:

> I saw the following message on this list about signal handling in CCL. I
> am wondering if either Gary or Leslie could share their strategies for
> doing certain things in CCL without being able to define a signal
> handler.  Specifically, how would you solve the problem of running a
> CCL-based web application on any given *nix, where the application needs
> to interpret and respond to signals on system shutdown, etc?
> Thanks for any input.
> Kevin Raison

There's an ad hoc mechanism for handling SIGTERM and SIGQUIT in your

(setq ccl:*quit-interrupt-hook*
   (lambda (signal-number) ; one of #$SIGTERM or #$SIGQUIT
     (do-application-specific-cleanup signal-number)))

It might be useful to be able to handle some other process-wide asynchronous
signals from lisp (things related to job control, maybe), but there's no
current mechanism to do this.

More information about the Openmcl-devel mailing list