[GRASS5] Re: [GRASSLIST:4564] Re: .tmp files

Markus Neteler neteler at itc.it
Wed Sep 25 07:59:03 EDT 2002


On Wed, Sep 25, 2002 at 12:21:46PM +0100, Glynn Clements wrote:
> 
> Markus Neteler wrote:
> 
> > > > > Apart from that, I suspect that a lot of programs need to take more
> > > > > care to remove temporary files once they are no longer needed.
> > > > 
> > > > Yes.
> > > > 
> > > > Another suggestion may be a GRASS daemon which get's informed about
> > > > temp files and can delete them later (rather than the  simplistic 
> > > > clean_temp approach). We should probably centralize such management
> > > > functionality.
> > > 
> > > First, I think that widespread implementation of Eric's suggestion
> > > (unlinking the file immediately upon creation) will mostly solve the
> > > problem.
> > 
> > Yes, it looks nice. Eric, do you want to submit that?
> 
> The addition of G_tempfile2() isn't the issue; even without any new
> library functions, you can just add calls to unlink() where necessary. 

Some weeks ago I have added unlink() in various places (some are obviously
still missing).

> The issue is changing the various modules to use it.

E.g. one problem is v.to.rast. It doesn't use G_tempfile() at all but
a private solution instead (and does not delete anything when this process 
is killed - signal handler required here?).

[...]

Markus




More information about the grass-dev mailing list