X-Git-Url: http://git.kpe.io/?p=kmrcl.git;a=blobdiff_plain;f=signals.lisp;h=cd40a60aca34d800c3f7018a7b90825b47639fd9;hp=1547aba571f11b9d05f20653dfe3833607be2fa2;hb=54cd6cb1b9550ac2310e2c6dffc9cdecd2bdccd3;hpb=fd37652c30bdee48588cd082de0a04b95ca07472 diff --git a/signals.lisp b/signals.lisp index 1547aba..cd40a60 100644 --- a/signals.lisp +++ b/signals.lisp @@ -1,4 +1,4 @@ -;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10; Package: modlisp -*- +;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; @@ -42,7 +42,7 @@ that the signal was successfully handled." (keyword (signal-key-to-number sig))))) #+allegro (excl:add-signal-handler signum handler) #+cmu (system:enable-interrupt signum handler) - #+lispworks + #+(and lispworks unix) ;; non-documented method to get old handler, works in lispworks 5 (let ((old-handler (when (and (boundp 'system::*signal-handler-functions*) (typep system::*signal-handler-functions* 'array)) @@ -50,8 +50,10 @@ that the signal was successfully handled." (system:set-signal-handler signum handler) old-handler) #+sbcl (sb-sys:enable-interrupt signum handler) - #-(or allegro cmu lispworks sbcl) (warn "Signal setting not supported on this platform.") - )) + #-(or allegro cmu (and lispworks unix) sbcl) + (declare (ignore sig handler)) + #-(or allegro cmu (and lispworks unix) sbcl) + (warn "Signal setting not supported on this platform."))) (defun remove-signal-handler (sig &optional old-handler) "Removes a handler from signal. Tries, when possible, to restore old-handler." @@ -64,7 +66,9 @@ that the signal was successfully handled." #+allegro (excl:remove-signal-handler signum) #+cmu (system:enable-interrupt signum (or old-handler :default)) ;; lispworks removes handler if old-handler is nil - #+lispworks (system:set-signal-handler signum old-handler) + #+(and lispworks unix) (system:set-signal-handler signum old-handler) #+sbcl (sb-sys:enable-interrupt signum (or old-handler :default)) - #-(or allegro cmu lispworks sbcl) (warn "Signal setting not supported on this platform.") - )) + #-(or allegro cmu (and lispworks unix) sbcl) + (declare (ignore sig handler)) + #-(or allegro cmu (and lispworks unix) sbcl) + (warn "Signal setting not supported on this platform.")))