httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lihet Ruben" <ruben.li...@my.fmi.unibuc.ro>
Subject [users@httpd] CGI Child Process Question
Date Fri, 20 Mar 2009 15:35:26 GMT
Hello,

My name is Lihet Ruben, I'm new to this mailing list. I have a question
about a CGI script I want to make.

So, this is the scenario. The CGI script will serve content to users (like a
file download) but I have to keep track of many other things. The most
important thing is I want to know if the person has downloaded the file
completely or canceled the download. So I thought that is the user cancels
the script, the program dies, I cannot log what happened. So I came with the
idea of creating a child for my cgi script, with fork() (btw I'm using c++)
and keep track of the child's activity and make decisions based on childs
return code. That would be ok at a first glance, but the problem is that the
parent cgi script is killed by the apache server. 

Now comes the question:
Q: How does apache kills cgi scripts ? Or, what happens with a cgi script
when a user hits cancel in the browser while the script was still executing
? Does apache send a signal to the cgi-script telling it to die or what ? 

Thanks in advance, 
Lihet Ruben.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message