I didn't get a response to this, but I found a solution that seems to work.

Add:

(setf swank:*communication-style* :fd-handler)

to your  ~/.swank.lisp  file   (or create this file and add it in if you don't have one...)


On Mon, Aug 2, 2010 at 1:31 PM, Kevin Smith <k2msmith@gmail.com> wrote:
I seem to have a problem when running a program (using cl-opengl, cl-glut) under slime on the threaded version of sbcl for mac os.  Whenever I execute a compile/load file from slime,  slime disconnects from the process. The message is:

------
Lisp connection closed unexpectedly: connection broken by remote peer

Error during redisplay: (error Connection closed.)
------


However, when I run the lisp program from the repl in sbcl, it loads fine. 

 I seem to think it is a problem with cl-opengl.  when I evaluate this region in the file from slime (with as little as cl-opengl included in the list), it disconnects:

(eval-when (:compile-toplevel :load-toplevel :execute)
  (require :cl-opengl)
  (require :cl-glu)   
  (require :cl-glut)
  (require :cl-opencv))

However, when I evaluate other functions (that can be evaluated independently), it doesn't disconnect.  Also, running this code from the repl doesn't cause any problems - only from slime.

I am using the latest slime version as well as the macports of sbcl (threaded) which I dowloaded via:

sudo port install sbcl +threads

btw, NON-threaded is not a problem;  slime works fine with all the above code.