> I see ObjectMemory>>#snapshot:, but I don't see
> ObjectMemory>>#snapshot:andQuit:. Am I missing something? Is there an
> idiomatic way to check to see whether we're resuming just after save or
> just after load?
No, I never thought of it.
> Currently, #snapshot: returns ObjectMemory. Could it return a boolean,
> or similar, indicating whether we're in the parent just after the save,
> or the saved image just after the load?
Yes, it could. Note that if the caller of #snapshot: is a CallinProcess
it does not survive image load; all CallinProcesses are not restarted in
the saved image (see fixup_object in save.c).
It should be enough to change
PROTECT_CURRENT_PROCESS_WITH (&localJmpBuf)
success = _gst_save_to_file (fileName);
to
/* fork(2)-style. Return true for the saved file... */
SET_STACK_TOP (_gst_true_oop);
PROTECT_CURRENT_PROCESS_WITH (&localJmpBuf)
success = _gst_save_to_file (fileName);
/* ... and false for the saving process. */
SET_STACK_TOP (_gst_false_oop);
in libgst/prims.def.
Paolo
_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk