Startup Splash screen

Milan Zimmermann milan.zimmermann at sympatico.ca
Tue Dec 7 00:21:20 UTC 2004


On December 6, 2004 03:48 pm, Tim Rowledge wrote:
> "Aaron Gray" <angray at beeb.net> wrote:
> > > All in all I think it's safest to recommend not trying to run the same
> > > image multiple times.
> >
> > Thats my point, but an average user is not necessarily going to
> > understand the error message or click on ok and end up not being able to
> > save any changes at a later point.
>
> Yup. Not a good thing to happen.
>
> > Either disallow two uses of the same image or provide a second changes
> > file.

Perhaps another option would be for the VM process to create a second small 
"lock file" whenever the changes file is open for write, and remove it when 
it's closed or the process exits. On startup, VM would check if the lock file 
exists, if it does, will not start. Of course there is the problem of crashes 
.. 

How to distinguish a "crash that did not remove the lock" from "another 
process is already running". This could be done by the VM writing, on a 
separate thread, a new "DateStamp" every 5 seconds inside the lock file and 
closing it quickly. 

When a "VM process" starts and the "lock file" exists, it would:
	- read the lock file contents several times for > 5 seconds (20 to be safe)
	- if the lock file content never changed, we had a crash, we remove lock and 
start
	- else there must be another process running.

Would something like that work and be implemented ..

Milan
>
> T'would be nice, but how to implement it? The image file is closed
> after startup so we can't (?) detect the problem by looking for any
> attempt to multiple-read it. Maybe there is someway to lock the changes
> file to a particular process on some OSs? We can't do a 'set to only
> open once' without biggish changes in the image - I did try ages ago
> becasue _my_ OS doesn't let you open a file for read if it's already
> open for modify (which personally I think is a good thing). In the end I
> had to write an entire underlayer for my FilePlugin to fake it out. Not
> a fun job.
> Suggestions welcome.
>
> > Please ignore me.
>
> Not whilst you're raising good points...
>
> tim
> --
> Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
> Logic is neither an art or a science but a dodge.




More information about the Squeak-dev mailing list