[GRASS-dev] Questions about GRASS temp directory

Glynn Clements glynn at gclements.plus.com
Mon Jun 19 01:47:23 EDT 2006


David Finlayson wrote:

> In the init.sh a temp directory is set up using the form
> <tempdir>/grass6-<user>-<pid> and then the GISRC is copied into this
> directory.
> 
> I don't see anywhere in the script where tmp is exported except
> perhaps as part of the path to $tmp/GISRC. How do other grass programs
> find this directory? Maybe nothing else uses it?

"tmp" isn't exported, although GISRC is.

> Anyway, does it matter if I change the name from grass6-user-pid
> convention to grass6-random-number? It turns out that I can't find a
> cross-platform way to get the user name in Python. Go figure.

A random number doesn't guarantee uniqueness; you at least need to use
the PID. You shouldn't have to worry about access by multiple hosts
via NFS, as NFS clients invariably have their own /tmp filesystem.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list