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 ;-)