[GRASS5] Cleaning of temp files

Markus Neteler neteler at itc.it
Thu Apr 18 11:57:14 EDT 2002


On Thu, Apr 18, 2002 at 02:50:11PM +0000, Michel Wurtz wrote:
> Markus Neteler wrote:
> > 
> > Does anyone have a suggestion if we can install something
> > like a cronjob or whatever, which deletes temp files of
> > a certain age?
> 
> That can be done, but is only a workaround : maybe the real
> question is  "why does Grass spread temp files all around ?"
> Any command that terminates should erase the various temp files
> created.

A good point! It seems that we have one or more leackages here.
Question is if we could add something to the temp file creation
routine G_tempfile() or so to find out the generating function
from the temp file. Maybe
8812.i.rectify

or so? Then I could watch the temp directory a while and
easily identify the candidates.

> Even when things are going bad, there are many ways to prevent
> the file to be left (the most used is to delete the file just
> after its creation : it will only disapears once closed, and
> that is automaticaly done by the system when the command
> terminates).
> 
> If only temp files from scripts (history, display lists, ...)
> remain, they would not be too big and the clean_temp function
> is enough...

The problem is that clean_temp is only called when leaving GRASS.
If you stay in a session for one week or month (yes, that happens),
you just fill the temp space.

Markus



More information about the grass-dev mailing list