Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^3: cleanup a cancelled CGI script

by cLive ;-) (Prior)
on Jun 08, 2004 at 21:22 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://362558]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-26 03:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found