Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: cleanup a cancelled CGI script

by goofball (Acolyte)
on Jun 08, 2004 at 20:40 UTC ( [id://362541]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (None)
    As of 2024-04-25 01:03 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found