I did the same thing a while back using 

(defun install-quit-handler (&optional (handler #'default-quit-handler))
  (sb-unix::enable-interrupt sb-unix:sigquit
                             (lambda (signal info context)
                               (declare (ignore signal info context))
                               (funcall handler)))

On Thu, Jan 6, 2011 at 4:11 PM, Daniel Weinreb <dlw@itasoftware.com> wrote:
If I want to write a function that gets called when a SBCL
process is sent a SIGQUIT, how do I do that?

This is to implement a feature that ops wants, where
if you send QRes a SIGQUIT, it prints out stack
traces of all the threads, just as Java does.

Since we aren't running SBCL "in production",
it's not totally crucial to make this work in
SBCL, but I'd like to.


-- Dan

Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
Sbcl-devel mailing list