Programmatically save image, and also do it periodically

David T. Lewis lewis at
Wed Jan 9 03:25:11 UTC 2008

On Tue, Jan 08, 2008 at 03:13:38PM -0600, itsme213 wrote:
> "Keith Hodges" <keith_hodges at> wrote in message
> > OSProcess is able to fork the image and save it, so as not to interupt
> > the running image.
> I found OSProcess but don't know how to "fork an image", actually I'm almost 
> out of time for this "feature" :-) If you know it off the top of your head 
> please shoot me a hint.


Assuming that you are running a Unix VM and that you have loaded the
OSProcess package, you can use "UnixProcess saveImageInBackground" or
"UnixProcess saveImageInBackgroundNicely".

Here is an explanation from the underlying #saveImageInBackground:nice: method

saveImageInBackground: savedImageName nice: niceFlag
	"When Squeak is used as a server it is sometimes desirable to periodically
	save image snapshots. This method forks a headless Squeak to perform a
	snapshot without impacting the server Squeak. Very little additional memory
	is required to do this because Unix copy-on-write memory management allows
	the two Squeak images to share object memory while the save is performed.
	The saved image is given a time stamped name, and the image name of
	the main server Squeak remains unchanged. If niceFlag is true, the
	background OS process runs at lowered scheduling priority."


More information about the Squeak-dev mailing list