Title: SAVE-IMAGE and :RESTART-FUNCTION
Consider: (SAVE-IMAGE "my-image" :restart-function 'my-restart )
When my-image runs, it calls MY-RESTART before multiprocessing starts,
hence the function MY-RESTART must not rely on multiprocessing. You
can however use MY-RESTART to tell the image to do something when
multiprocessing starts up, e.g.
(defun my-restart ()
(push '("initialize" nil my-initialization-function)
If MY-RESTART returns, then normal startup, as in the original image,
follows. You need the patch run-first-top-level-p-hook (:SYSTEM patch
sequence, patch level 4.1.19) for this on Windows and Linux.
If you are simply looking for where to add an initialization routine,
then it is simpler to add it to one of the existing action lists "When
starting image", "Upon Starting Environment" or "Initialize LispWorks
Tools". See Knowledgebase item "Action Lists".
|See Also: (link)|