From c336b618b735904463247b60d36bb96186731b4c Mon Sep 17 00:00:00 2001 From: tamamu Date: Tue, 8 Aug 2017 03:01:43 +0900 Subject: [PATCH] Add interrupt handler --- src/clack.lisp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/clack.lisp b/src/clack.lisp index 5c5d17f6..1ee79c0d 100644 --- a/src/clack.lisp +++ b/src/clack.lisp @@ -59,6 +59,8 @@ silent (use-thread #+thread-support t #-thread-support nil) (use-default-middlewares t) + (interrupt-handler + (lambda () (format *error-output* "Interrupted"))) &allow-other-keys) #-thread-support (when use-thread @@ -79,8 +81,7 @@ (when (and (not use-thread) (not silent)) (format t "~&~:(~A~) server is going to start.~%Listening on localhost:~A.~%" server port)) - (with-handle-interrupt (lambda () - (format *error-output* "Interrupted")) + (with-handle-interrupt interrupt-handler (prog1 (apply #'clack.handler:run app server :port port