testing for image restart

Andreas Raab andreas.raab at gmx.de
Sat Jan 4 00:29:14 UTC 2003

I don't think this is what Derek meant. I would presume that he's rather
interested in finding out if the image crashed the last time it was run.
I've actually been interested myself in this but as of now there's no
way to distinguish between a "quit" and a crash. It is also hard to
figure out (for example) if you crashed after a "save".

The reason why I wanted this was actually to have a trivial little
watcher that should come up and tell newbies "by the way you crashed but
here are changes you did" and throw them right into a change list - I've
found that many newbies are very concerned about "loosing their stuff"
since Squeak doesn't present that standard "file based feel" and there
is nothing obvious that tells them that you can recover everything from
the changes with the right tool (and what and where this tool is).

  - Andreas

> -----Original Message-----
> From: squeak-dev-admin at lists.squeakfoundation.org 
> [mailto:squeak-dev-admin at lists.squeakfoundation.org] On 
> Behalf Of Ned Konz
> Sent: Saturday, January 04, 2003 1:18 AM
> To: squeak-dev at lists.squeakfoundation.org
> Subject: Re: testing for image restart
> 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

More information about the Squeak-dev mailing list