First off, I haven't been able to find any comprehensive information on the add-fd-handler function and related stuff, so I might be missing something obvious here. I use these handlers for accepting connections on a server socket, something like this:

  (let ((socket (make-instance 'inet-socket :type :stream :protocol :tcp)))
    (socket-bind socket ip port)
    (socket-listen socket 64)
    (add-fd-handler (socket-file-descriptor socket) :input (make-connection-handler socket)))

Where make-connection-handler generates a function that will accept and handle the connection. I stole this system from the Araneida webserver and it used to work perfectly. But I wanted to use threads in my program, so I recompiled SBCL (0.9.4) with sb-thread support (Suse Linux on an intel 32-bit processor, kernel version 2.6.8). The threads seem to work, but since the fd-handlers do not seem to work at all with the thread-enabled SBCL. The add-fd-handler function does not produce an error, and does return a handler, but the handler never gets called (at least, it does not get called in situations where it should get called). I could replace it with a thread that tries to accept sockets, but the program also still uses Araneida and I'd rather not go hacking in there.

So is this a known problem? And is there a solution?

Thanks for reading,