[slime-devel] slime and dumping
R. Matthew Emerson
rme at clozure.com
Wed Feb 8 19:53:55 UTC 2012
On Feb 8, 2012, at 2:40 PM, Antony wrote:
> I have run into one issue.
> I load slime (even if I don't start a swank server)
> do a dump
> execute the dump
> try to start slime
> I get an error saying
> > Error: #<BASIC-CHARACTER-OUTPUT-STREAM :CLOSED #x30200050C08D> is closed
> > While executing: CCL::STREAM-IS-CLOSED, in process toplevel(3).
> > Type :POP to abort, :R for a list of available restarts.
> > Type :? for other options.
> 1 > :b
> I have found a solution by writing code as below
> (defun start-slime ()
> (when (and swank:*log-output* (not (open-stream-p swank:*log-output*)))
> (setf swank:*log-output* nil)
> (swank:create-server :port 4005 :dont-close t :coding-system "utf-8-unix"))
> I am wondering what is the right way to do this or how do people do this.
> Basic requirement is be able to dump my whole app including slime code and then load up the dumped executable and be able to start slime as part of the app execution. The above code does allow me to do this (I think). But I haven't yet tried what else can go wrong (like when debugger is invoked etc)
> What is the usual thing people do for this situation
Gary Byers commented on this problem at
https://bugs.launchpad.net/slime/+bug/444427 describes this
bug, and notes that a fix was committed for sbcl. I added a comment
suggesting that a similar fix could be added to swank-ccl.lisp, e.g.,
(push #'(lambda ()
(setq swank:*log-output* nil) ccl:*save-exit-functions*)
or something like that.
More information about the slime-devel