enemyofthestate has asked for the wisdom of the Perl Monks concerning the following question:
Never mind! I finally figured out that Apache sends a SIGTERM...
How does a Fast CGI program know that Apache is terminating it? AFAIK the basic process for Fast CGI is:
It is how to run the cleanup part that I cannot figure out. I tried a few tests (mostly just printing something to STDERR) and it looks like when Apache terminates the program the cleanup code never gets executed. So far there have been no problems attributable to the above but the code interfaces to a vendor supplied C library and, without being able to tell it to clean up after itself, I don't know what kind of junk it might leave laying about. I'd like to be clear on this before going to production.## Initialize stuff while (my $cgi = Fast::CGI->new) { # do something undef $cgi; } ## cleanup stuff
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Fast CGI termination
by ikegami (Patriarch) on Sep 15, 2017 at 04:08 UTC |