[GRASS-dev] Re: [GRASS GIS] #226: WinGRASS fails to create .gislock
opening a mapset
GRASS GIS
trac at osgeo.org
Tue Jan 3 09:14:28 EST 2012
#226: WinGRASS fails to create .gislock opening a mapset
----------------------------+-----------------------------------------------
Reporter: msieczka | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 6.4.2
Component: Default | Version: svn-develbranch6
Keywords: wingrass, qgis | Platform: MSWindows XP
Cpu: All |
----------------------------+-----------------------------------------------
Comment(by mmetz):
Replying to [comment:18 glynn]:
> Replying to [comment:17 mmetz]:
> > The check for the state of a lock file should return one of three
answers: is valid, can't say, is stale. The lock file is (should be)
removed if stale, if its status is unknown, user-interaction is probably
the only option.
>
> The main requirement for this is that the lock file needs to contain
both the host and the PID. As for the check: if the host is not the local
system, the status is unknown, otherwise the lock file is considered live
if the PID exists and stale otherwise. False positives can be reduced by
testing for the PID twice with a delay in between.
Sounds good to me. If the host is not the local system, the status is
unknown, but (most of the time) it should be safe to assume that the lock
is alive and not stale.
>
> Having the PID in the lock file is the only way that an "obviously
stale" lock file can be detected and overridden automatically. Without
that, any lock file must be assumed to be live, with any override
requiring user involvement.
This is what we probably have to settle for with windows and lock files
created from different hosts.
>
> Storing the user in the lock file is harmless but redundant. The user
stored in the lock file will always be the user who owns both the mapset
directory and the .gislock file. The start-up code won't let you select a
mapset which you do not own as the current mapset.
Ah ok, I thought write permission suffices.
Markus M
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/226#comment:20>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list