PackageDescription: ImageLocker


Image Locker

Last published: July 4, 2010 by 'mivsek'

Defines 1 Classes
Extends 2 Classes


ImageLocker lock an image to prevent that the other image with the same name will accidentially start. That way a running of duplicate images is prevented. Such run can namelly has a disastrous consequences.

Lock is managed by special file .lock. If the same image with the same name starts and finds this lock file locked, it wont start but will quit in 30 seconds. If a lock file is there but unlocked (after an image crash), it will won't quit but will be locked again. Quit can be prevented by evaluating 'ImageLocker stop' before quit. See Transcript for the lock/unlock report and stop quit instructions.

ImageLocker can be temporary disabled by starting an image with a -nolock option from command line (after the image name). In case of saving the image under a different name the old image will be unlocked and one with a new name locked.

ImageLocker is implemented as a subclass of Subsystem, which is activated (image is locked) immediatelly after this package/parcel is loaded and deactivated (image is unlocked) when package/parcel is unloaded.

(c) Janko Mivsek, jun2010. License: MIT