[GRASS-dev] [GRASS GIS] #560: WinGRASS not deleting temp ppm files from map display
GRASS GIS
trac at osgeo.org
Tue May 28 13:26:47 PDT 2013
#560: WinGRASS not deleting temp ppm files from map display
----------------------------------------+-----------------------------------
Reporter: isaacullah | Owner: grass-dev@…
Type: defect | Status: new
Priority: critical | Milestone: 6.4.3
Component: Display | Version: 6.4.0 RCs
Keywords: v.digit ppm temp, wingrass | Platform: MSWindows XP
Cpu: x86-32 |
----------------------------------------+-----------------------------------
Comment(by glynn):
Replying to [comment:20 hamish]:
> some slight improvement in devbr6 with r56444, but still more to do.
>
> is there a reason for the temp .ppm files not to live in
/tmp/grass6-$USER-$PID/ with gisrc for easier cleanup if something crashes
or MS Windows happens?
The location of the temporary directory is chosen by the init script,
which doesn't "publish" the location directly. If GRASS was started using
the init script, the directory can be inferred from $GISRC, but there's no
reliable way to know whether GRASS was actually started using the init
script.
Most uses of G_tempfile() are wrong (including its use by g.tempfile), but
there isn't an official API for obtaining a normal temporary directory.
AFAICT, the only code which should actually be using G_tempfile() is
lib/raster/open.c and lib/raster3d/open.c.
In light of that, G_tempfile() should probably be changed to use a similar
mechanism to the init script (possibly by having the script set
GRASS_TMPDIR), and a new function created for the code which requires the
existing behaviour (i.e. requires that the temporary file is within the
mapset directory so that rename() and link() work).
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/560#comment:21>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list