testing for image restart

Derek Brans brans at nerdonawire.com
Sat Jan 4 03:04:15 UTC 2003


I gather a (in Ned's words) "snapshot" restart is equivalent to: save 
and quit then restart
While a "start from fresh" is equivalent to quit or crash no save then 
restart.

On Friday, January 3, 2003, at 05:21 PM, Derek Brans wrote:

> Thanks for your replies.  What is the diff between snapshot vs starting 
> fresh?
>
> If I'm backing up data from my image, I need to know when the image has 
> "quit without save" or crashed, because in that case, the backup data 
> on disk is probably more recent than the data in the image.
>
> Thanks again,
> Derek
>
> On Friday, January 3, 2003, at 04:18 PM, Ned Konz wrote:
>
>> On Friday 03 January 2003 04:12 pm, Derek Brans wrote:
>>> Is there a way for the image to know when it has been restarted
>>> (ie, the vm is killed and then restarted).
>>
>> Yes: all the classes registered with the startup list get notified by
>> calling their #startUp: or #startUp method. The parameter to startUp:
>> indicates whether the image is restarting after a snapshot.
>>
>> you do this:
>>
>> Smalltalk addToStartUpList: SomeClass.
>>
>> later the system calls:
>>
>> SomeClass startUp: true  (if resuming after snapshot)
>> or
>> SomeClass startUp: false (if starting fresh)
>>
>> --
>> Ned Konz
>> http://bike-nomad.com
>> GPG key ID: BEEA7EFE
>>
>>
>>
>>
> Nerd on a Wire: Web and Information Solutions
> Website Design - Database Systems - Site Hosting
> 604.874.6463
> mailto:info at nerdonawire.com
> For more information, visit http://nerdonawire.com
>
>
>
>
Nerd on a Wire: Web and Information Solutions
Website Design - Database Systems - Site Hosting
604.874.6463
mailto:info at nerdonawire.com
For more information, visit http://nerdonawire.com




More information about the Squeak-dev mailing list