[GRASS5] Multiple sessions

Radim Blazek blazek at itc.it
Tue May 18 09:44:20 EDT 2004


On Thursday 13 May 2004 21:05, Glynn Clements wrote:
> Radim Blazek wrote:
> > Are there any objections to enable multiple sessions
> > (one per mapset) in 5.7? Basically:
> >
> > cp $HOME/.grassrc57 /tmp/grass57-$USER/gisrc.$$
> > set GISDBASE, LOCATION_NAME, MAPSET
> > check $LOCATION/.gislock
> > run GRASS session
> > rm -f $LOCATION/.gislock
> > cp /tmp/grass57-$USER/gisrc.$$ $HOME/.grassrc57
> > rm -f /tmp/grass57-$USER/gisrc.$$
>
> There is one set of monitors per user, but monitors are tied to the
> session in which they are started due to the redraw-on-resize code
> (any commands will be run with $GISRC set to the value which the
> driver inherited from mon.start).
>
> I think that we would really need to have one set of monitors per
> session. Either that, or just remove the redraw-on-resize code (which
> would be a good thing in any case).

So, change _get_make_sock_path() (lib/gis/unix_socks.c) to return 
/tmp/grass'VERSION_MAJOR''VERSION_MINOR'-$USER-$GIS_LOCK
instead of 
/tmp/grass'VERSION_MAJOR''VERSION_MINOR'-$USER
set $GISRC to tmp/grass57-$USER-$GIS_LOCK/gisrc
and close all running monitors when GRASS session is closed.

Patches attached.

Radim
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unix_socks.c.patch
Type: text/x-diff
Size: 1354 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20040518/2d1bbac4/unix_socks.c.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: init.sh.patch2
Type: text/x-diff
Size: 2851 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20040518/2d1bbac4/init.sh.bin


More information about the grass-dev mailing list