On 4 November 2011 17:54, Andrew Myers asm198@gmail.com wrote:
I've got an updated version that seems to work quite well:
(defun aux-save-image (image-name) (let ((old-restart excl:*restart-init-function*)) (setf excl:*restart-init-function* (lambda () (dolist (connection swank::*connections*) (format t "closing ~a~%" connection) (swank::close-connection connection nil nil)) (when old-restart (funcall old-restart)))) (excl:dumplisp :name image-name) (setf excl:*restart-init-function* old-restart)))
Is there anything wrong with doing things this way? I get the same
Closing a connection on initialization is risky. Consider: what if the underlying FD has is already in use in the new image?
You should clean up before you save, not when you initialize.
Cheers,
-- Nikodemus