[slime-devel] Shutting down Swank within an Image.

Helmut Eller heller at common-lisp.net
Fri Nov 4 18:32:43 UTC 2011

* Andrew Myers [2011-11-04 17:24] writes:

> Is this a problem in Lisp?  I know in C that's an issue since you're
> just calling close on an integer but I had thought lisp would handle
> that more gracefully.  Although I guess the behavior isn't specified
> since saving an image is outside the spec?

Lisp and C use the same API to the OS so it's the same problem and there
is no general solution.

> The problem with cleaning up _before_ saving the image is that you
> can't use the image any more.  I was hoping to have a solution that
> didn't require an exit and restart every time an image was dumped.

On Unix, one trick is to fork before saving.  In the child process,
clean up OS resources, dump the image and exit.  The parent process
continues normally.


More information about the slime-devel mailing list