Hi all,
I’m afraid that I didn’t have enough spare time to correctly follow this discussion, that actually I started.
On the last days I have been GRASS Off since I bought a new machine and I needed to migrate (from XP to Vista… please, don’t say nothing! I’m really upset!).
Now I’m quite operative, but I think that, about this discussion, I actually missed the point 
Is there something that I can do?
creating a .gislock file in the current opened location could be a solution?
what should I write in the .gislock file?
when should I create it? from init.bat/.sh or from another shell file?
Thanks,
Marco
Marco Pasetti wrote:
I'm afraid that I didn't have enough spare time to correctly follow this
discussion, that actually I started.
On the last days I have been *GRASS Off* since I bought a new machine
and I needed to migrate (from XP to Vista... please, don't say nothing!
I'm really upset!).
Now I'm quite operative, but I think that, about this discussion, I
actually missed the point 
Is there something that I can do?
creating a .gislock file in the current opened location could be a
solution?
what should I write in the .gislock file?
*when* should I create it? from init.bat/.sh or from another shell file?
IIRC, if you just set GIS_LOCK (to anything) in init.bat, g.mapset
will work. On Windows, the etc/lock program always succeeds (after
printing a warning), so it's up to you to ensure that you don't run
multiple GRASS sessions concurrently in the same mapset.
--
Glynn Clements <glynn@gclements.plus.com>
Hi Glynn,
IIRC, if you just set GIS_LOCK (to anything) in init.bat, g.mapset
will work. On Windows, the etc/lock program always succeeds (after
printing a warning), so it's up to you to ensure that you don't run
multiple GRASS sessions concurrently in the same mapset.
at the moment I don't have GRASS installed on this machine, so I cannot check it, but IIRC the .gislock file was not created, even if I added GIS_LOCK=0 in the init.bat;
that missing causes a problem when trying to close a mapset.
Marco
Marco Pasetti wrote:
> IIRC, if you just set GIS_LOCK (to anything) in init.bat, g.mapset
> will work. On Windows, the etc/lock program always succeeds (after
> printing a warning), so it's up to you to ensure that you don't run
> multiple GRASS sessions concurrently in the same mapset.
at the moment I don't have GRASS installed on this machine, so I cannot
check it, but IIRC the .gislock file was not created, even if I added
GIS_LOCK=0 in the init.bat;
Correct.
that missing causes a problem when trying to close a mapset.
What problem?
g.mapset just calls remove() on the old mapset's .gislock file; it
doesn't even check the return value, let alone complain.
etc/lock just prints a warning then exits with a success status.
init.sh unconditionally removes the file with "rm -f", which doesn't
care whether it actually exists.
init.bat doesn't mention .gislock at all.
AFAICT, nothing else even knows of that file.
--
Glynn Clements <glynn@gclements.plus.com>