[GRASS-dev] [GRASS GIS] #3631: Mapset remains locked after switch to it and exit

GRASS GIS trac at osgeo.org
Fri Aug 31 20:23:42 PDT 2018


#3631: Mapset remains locked after switch to it and exit
-------------------------+-------------------------------------------------
  Reporter:  wenzeslaus  |      Owner:  grass-dev@…
      Type:  defect      |     Status:  assigned
  Priority:  normal      |  Milestone:  7.6.0
 Component:  Startup     |    Version:  svn-trunk
Resolution:              |   Keywords:  init, grass.py, lock, gislock,
       CPU:              |  g.mapset
  Unspecified            |   Platform:  Linux
-------------------------+-------------------------------------------------

Comment (by wenzeslaus):

 The attached patch basically replaced removal of acquired lock stored in a
 variable

 {{{
 if self.lockfile:
     try_remove(self.lockfile)
 }}}

 by removal based on the gisrc file.

 {{{
 def unlock_gisrc_mapset(gisrc, gisrcrc):
     settings = load_gisrc(gisrc, gisrcrc)
     lockfile = os.path.join(settings.full_mapset, ".gislock")
     try_remove(lockfile)
 ...
 atexit.register(lambda: unlock_gisrc_mapset(gisrc, gisrcrc))
 }}}

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/3631#comment:1>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list