[slime-devel] slime-interrupt in openmcl

Alan Ruttenberg alanralanr at comcast.net
Sat Dec 13 07:47:42 UTC 2003


Currently breaks things by interrupting the listener process in the 
inferior lisp.

Here's one way to fix it (in swank-openmcl.lisp)

(defun create-swank-server (port &key (reuse-address t)
                             (announce #'simple-announce-function))
   "Create a Swank TCP server on `port'."
   (let ((server-socket (ccl:make-socket :connect :passive :local-port 
port
                                         :reuse-address reuse-address)))
     (funcall announce (ccl:local-port server-socket))
     (setq ccl::*interactive-abort-process* ;; tell openmcl which 
process you want to be interrupted when sigint is received
           (ccl:process-run-function "Swank Request Processor"
                                     #'swank-accept-connection
                                     server-socket))))

Then add this redefinition

(defun ccl::force-break-in-listener (p)
   (ccl::process-interrupt p
		     #'(lambda ()
			 (ccl::ignoring-without-interrupts
                           (let ((*swank-debugger-stack-frame* nil)
                                 (previous-p nil))
                             (block find-frame
                               (map-backtrace
                                #'(lambda(frame-number p tcr lfun pc)
                                    (declare (ignore frame-number tcr 
pc))
                                    (when (eq (ccl::lfun-name lfun) 
'swank::eval-region)
                                      (setq *swank-debugger-stack-frame* 
previous-p)
                                      (return-from find-frame))
                                    (setq previous-p p))))
                             (invoke-debugger)
                             (clear-input *terminal-io*))))))

-Alan






More information about the slime-devel mailing list