in reply to cleanup a cancelled CGI script

I'm running the script on a Unix-based FreeBSD system running the Apache 1.3.27 server.

I think I'll use the SIGPIPE approach.
There are already a lot of crons on my server - and the thing about those is I get an email from the root process every time one runs. I think it's more elegant to have the script clean up after itself.

And thanks to saskaqueer for your post. I didn't even think to use an "or die" statement on a print call. Not enough coffee today ...

Thanks! You monks are awesome.

Replies are listed 'Best First'.
Re^2: cleanup a cancelled CGI script
by sgifford (Prior) on Jun 08, 2004 at 21:35 UTC
    As an aside, if the only thing you don't like about cron is that it emails you the output from the programs it runs, you can stop that by redirecting a program's output to /dev/null like this:
    ... your_script >/dev/null 2>&1