So I've been looking into the problem of restarting a lisp image saved from Slime. It appears to me that Swank is still blocked on the socket listening for connections in the restarted image in some cases (I'm not sure why it's inconsistent). As a result when the image is restarted it's stuck listening on a connection that will never receive data and can't execute the Swank initialization process to connect to the new socket which Slime has chosen.
I was thinking that I would implement swank-backend:save-image to shutdown Swank before dumping the image (or possibly have the restart function shutdown any existing Swank processes) so there's nothing in the way of Swank being re-initialized when the image is loaded again. (Does this sounds like a reasonable thing to do?) I'm not sure how to do this though, there only seem to be methods for shutting down the Swank server, not individual connections. Looking at other implementations of save-image wasn't very illuminating so I seem to be missing something.
It looks like the connection struct and the *connections* defvar might have what I need in it, but there is only sanctioned access to the most recently opened connection via `default-connection`. Presumably I would need to close _all_ *connections*?
Can anyone point me in the right direction?
Thanks, Andrew