Detecting early termination by client
Stephen Carville
stephen at totalflood.com
Sat Apr 16 00:14:25 UTC 2005
I have a Perl CGI script that runs on Apache on Linux using mod_cgi.
The script takes a XML document POSTed by the client, parses it,
validates the data, places the order into the Oracle database, sends a
response back to the customer, then creates a log entry of what
happened. Unfortnately I have one customer who insists on not waiting
for an acknowlegment (even tho he requests one) but drops the connection
as soon as the data is on the wire. This (I think) is causing Apache to
terminate the CGI process before it completes the processing. Sometimes
the order gets placed, sometimes it does not. Since logging happens at
the end, I don't always know an order was attempted.
Is there any way I can capture this early terminaition so I can handle
it intelligently? I know how to set up a signal handler but I don't
know what signal -- if any -- to look for.
More information about the redhat-list
mailing list