Created
June 19, 2023 09:27
-
-
Save svetlyak40wt/e4afab04a73110f76fd197ee824ce7fc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun save-me (core-file) | |
"This function closes all threads and dumps image of SBCL into the core file." | |
(flet ((saver () | |
(loop for thread in (sb-thread:list-all-threads) | |
unless (eql thread | |
sb-thread:*current-thread*) | |
do (sb-thread:terminate-thread thread) | |
finally (save-lisp-and-die core-file)))) | |
(loop for thread in (sb-thread:list-all-threads) | |
when (string-equal (sb-thread:thread-name thread) | |
"main thread") | |
do (sb-thread:interrupt-thread thread #'saver)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To connect back from Portacle using core, do in the Portacle
C-u M-x slime
.Then enter:
/Applications/portacle/mac/bin/sbcl -core /tmp/portacle.core
It starts SBCL and connects to it. But something strange happened – all loaded packages are disappeared after the load, however core size increased comparing to the core without Dexador loaded.