On Fri, Jan 21, 2005 at 07:51:19PM -0500, Stuart Brorson wrote: > Lockfiles will be simple ASCII text. Inside each lockfile, there will > be the following (for example): > ------------------------------------------------------ > # This is a gEDA/gaf lockfile signalling that this .sch file > # has been locked for editing. If you are sure that nobody > # is currently editing this file, you may delete this lockfile > # to use gEDA/gaf normally. > # > # user who locked this file > user=sdb > # process number of program creating this lock > pid=345345 > # program name which created this lock > program=gattrib > # time when lock was created > timestamp=YYYYMMDD.HHSS > -------------------------------------------------------
You may wish to also record the hostname of the system that created the lock otherwise the pid may not be easy to do anything with. Also you may wish to include a version number of the lock file and perhaps the os/version of the system which placed the lock. Also what do you think about automatic expiring of locks? For example if a program has a lock, it is required to once an hour update a time stamp in the lock file. Then perhaps if a time stamp is more than 2 hour old the lock file is declared invalid. This may help with the problem of stale lock files being left around if a program crashes or a computer or network goes down. -Dan --
