Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

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?

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2020-08-14 23:40 GMT
Find Nodes?
    Voting Booth?
    Which rocket would you take to Mars?

    Results (77 votes). Check out past polls.