Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: cleanup a cancelled CGI script

by Anonymous Monk
on Jun 08, 2004 at 21:14 UTC ( [id://362553]=note: print w/replies, xml ) Need Help??


in reply to cleanup a cancelled CGI script

try using the sigtrap module

Replies are listed 'Best First'.
Re^2: cleanup a cancelled CGI script
by goofball (Acolyte) on Jun 16, 2004 at 13:09 UTC
    UPDATE:: I got a lot of good advice after posting this thread - thanks to all. I tried using
    $SIG{PIPE} = sub { ... };
    but found that it wasn't working all the time. It turns out that by hitting the stop button on the browser, a SIGTERM was ending the script in stead.

    I took this anonymous suggestion to use the sigtrap module, and that's working flawlessly now. Thanks!
    use sigtrap qw(die untrapped normal-signals); END { ... here's where I clean up the zip file ... }
    sigtrap

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2024-04-19 09:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found