[Qgis-developer] .gislock

Benjamin Ducke benjamin.ducke at oxfordarch.co.uk
Tue Jan 20 04:39:37 EST 2009


Unfortunately, the GRASS lock file contains no information as to
who logged into the mapset last, so it will be hard for the user
to make an informed decision in some cases.

Maybe a good idea would be for the GRASS plugin to store its
own lock file with the current machine name and user name alongside
the GRASS lock file. That lock file should only get deleted if the
GRASS plugin cleanly logs out of the current mapset.
After a crash, it would still be present and the plugin could display
something like:

"The mapset appears in use by:"user name" on machine "pc name" are you
sure you want to proceed? Caution: this may result in data loss if 
another user or program is accessing the same data".

Of course, if the mapset was locked by, e.g. a regular GRASS shell,
that information will not be available and "user name" and "pc name"
will have to be displayed as "unknown".

In that case, one will have to rely on user wisdom and network file
access permissions to work properly ...

Ben


Paolo Cavallini wrote:
> Benjamin Ducke ha scritto:
>> There needs to be a mechanism to detect whether the GRASS plugin
>> or QGIS itself have crashed while connected to mapset A. If that is
>> true, then the GRASS plugin should tell the user, next time he or
>> she connects to mapset A, that a crash occured in the last session
>> and offer to remove the lock file.
> 
> Or perhaps a warning: "the mapset appears in use: are you sure you want
> to proceed? Caution: this may result in data loss if another user or
> program is accessing the same data". Then, if yes, rm .gislock.
> pc


-- 
Benjamin Ducke
Senior Applications Support and Development Officer

Oxford Archaeology Ltd
Janus House
Osney Mead
OX2 0ES
Oxford, U.K.

Tel: +44 (0)1865 263 800 (switchboard)
Tel: +44 (0)1865 980 758 (direct)
Fax :+44 (0)1865 793 496
benjamin.ducke at oxfordarch.co.uk




------
Files attached to this email may be in ISO 26300 format (OASIS Open Document Format). If you have difficulty opening them, please visit http://iso26300.info for more information.



More information about the Qgis-developer mailing list