Index: smalltalk-3.0/libgst/prims.def =================================================================== --- smalltalk-3.0.orig/libgst/prims.def 2008-01-08 17:30:06.000000000 +0000 +++ smalltalk-3.0/libgst/prims.def 2008-01-08 17:47:21.000000000 +0000 @@ -5071,13 +5071,21 @@ fileName = _gst_to_cstring (oop2); errno = 0; + /* first overwrite the stack top with true. When we resume from + the save, the stack will be in this state. See below. */ + SET_STACKTOP_BOOLEAN(1); + PROTECT_CURRENT_PROCESS_WITH (&localJmpBuf) success = _gst_save_to_file (fileName); xfree (fileName); - if (success) + if (success) { + /* We're returning in the parent, not resuming from + save. Overwite the stack top again, with false this time, + to let the caller know which side of the fork we're on. */ + SET_STACKTOP_BOOLEAN(0); PRIM_SUCCEEDED; - else + } else _gst_set_errno (errno); } UNPOP (1);