Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^3: cleanup a cancelled CGI script

by cLive ;-) (Prior)
on Jun 08, 2004 at 21:22 UTC ( #362558=note: print w/replies, xml ) Need Help??


in reply to Re^2: cleanup a cancelled CGI script
in thread cleanup a cancelled CGI script

Why not just do it in the script when it runs?
my $tmp_dir = "/path/to/tmpdir"; opendir(TMPDIR,$tmp_dir) || die $!; -M "$tmp_dir/$_" > 1/24 and unlink "$tmp_dir/$_" for (grep /zip/, read +dir(TMPDIR)); closedir(TMPDIR);
or similar (untested).

cLive ;-)

Replies are listed 'Best First'.
Re^4: cleanup a cancelled CGI script
by kragen (Sexton) on Jun 09, 2004 at 21:16 UTC
    That's going to result in some concurrency problems.
      In what way? All I'm doing is removing tmp files over an hour old?!?

      cLive ;-)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://362558]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2020-12-02 07:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you use taint mode?





    Results (35 votes). Check out past polls.

    Notices?