[GRASSLIST:3893] Re: concurrent use

Glynn Clements glynn.clements at virgin.net
Tue Jul 13 19:55:33 EDT 2004


tatel at euskalnet.net wrote:

> So I should remove .gislock file on my home dir... but I can't find any
> .gislock file on the whole system.

Your problems appear to start with the fact that the g.gisenv program
isn't found. All subsequent errors are artifacts of that initial
error.

Essentially:

1. Init.sh uses g.gisenv to set some variables to the values of the
database, location and mapset:

	GISDBASE=`g.gisenv GISDBASE`
	LOCATION_NAME=`g.gisenv LOCATION_NAME`
	MAPSET=`g.gisenv MAPSET`

Because g.gisenv failed, these variables will all be set to the empty
string.

2. It then uses those variables to determine the path to the mapset
directory:

	LOCATION=${GISDBASE?}/${LOCATION_NAME?}/${MAPSET?}

Because these variables are empty, LOCATION gets set to "//".

3. It then tries to create the .gislock file in that directory (in 5.3
and earlier it uses your home directory, but 5.7 uses the mapset
directory):

	# Check for concurrent use
	lockfile="$LOCATION/.gislock"
	"$ETC/lock" "$lockfile" $$

4. This fails, because $LOCATION is actually "//", so it tries to
create "///.gislock", i.e. in the root directory, and you probably
don't have write permission on the root directory.

5. Init.sh assumes that, if $ETC/lock fails, it's because the .gislock
file already exists, i.e. the mapset is "locked", and so complains
that someone is already using that directory ("concurrent use").

In this case, that assumption is wrong, and so the error message is
inaccurate.

-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-user mailing list