in reply to Temporary files and cleaning up after an interruption

Another solution might be to stick to a naming convention when generating the temporary files, and make another script run every X time units that deletes all files matching the naming convention that are older than Y time units.

Christian Lemburg
Brainbench MVP for Perl
http://www.brainbench.com

  • Comment on Re: Temporary files and cleaning up after an interruption

Replies are listed 'Best First'.
Re: Re: Temporary files and cleaning up after an interruption
by mischief (Hermit) on Jan 04, 2001 at 19:09 UTC
    I was thinking of doing something like that, but there were a couple of reasons I decided against it.

    Firstly, it makes the temporary files (more) predictable, which makes it easier to exploit the script (I know if everything else is handled properly this shouldn't be a problem, but you can never be too paranoid careful).

    Also, the script is a fairly small utility and I'd like to make it as self-contained as possible. Having a cleanup script run via cron is a bit overkill for this.

    From what I've been reading about %SIG, it looks like the right solution. I'll post something if I figure out a nice solution.