httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Boaz Yeger <>
Subject Re: the requirements of keep-alive support
Date Mon, 25 May 1998 18:19:52 GMT

Before you all flame me that my question is a CGI question, etc, I am writing
it to you (the apache developers) since I think that the problem I am having
is with the Apache web server 1.2.6.

I am running the 1.2.6 on a RedHat 4.2 i386, and I send a form to a CGI
script.  The script, than does double fork, change the process group number of
the child, and execute a job.  This job can run from 5 seconds to 7 hours.
The problem I am having is that if the job is not done in 10 seconds, it just

Here is what I am doing:

     unless($pid = fork) {
       setpgrp(0, 0);
       unless (fork) {
	 setpgrp(0, 0);
	 exec ("my program");

Doing so, I hoped will make sure that Apache can find that spawned child and
kill it.

When I run the script dry (i.e. invoke it from the command line and not via
the web server), I have no problems - The job never die.  However, once I
invoke it over the web...

I tried to trap all possible signals (SIGTERM, SIGPIPE, SIGHUP), but no luck.
>From looking at mod_cgi.c it seems like it sending a kill signal.
Nevertheless, from looking at http_main.c I tend to believe that it need to
record a kill signal, but there is no record of it in any of my logs.


 1.  Is the death after 10 seconds is a known thing in Apace 1.2.6
 2.  If so, what can I do to resolve it

Thanks in advance for you time and your help,

Boaz Yeger		 | VOICE:  909.787.2986	
Network Systems Manager  | FAX:    909.787.3188 
College of Engineering   | E-Mail:
University of California | E-Mail:
Riverside, CA 92521-0304 | WWW: 

View raw message