httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <>
Subject Re: Defaulting SIGCHLD in the children?
Date Sat, 18 Apr 1998 18:35:28 GMT
I don't know why apache doesn't default SIGCHLD all the time.

As far as this particular users' bug, it sounds like a glibc problem.  And
my reasoning for this is the following from the glibc documentation:

 - Macro: int SIGCHLD
     This signal is sent to a parent process whenever one of its child
     processes terminates or stops.

     The default action for this signal is to ignore it.  If you
     establish a handler for this signal while there are child
     processes that have terminated but not reported their status via
     `wait' or `waitpid' (*note Process Completion::.), whether your
     new handler applies to those processes or not depends on the
     particular operating system.

There are similar sounding bugs in the apache bugdb.  My suspicion is
something involving popen().  Do you use popen() for anything?


On Sat, 18 Apr 1998, Rasmus Lerdorf wrote:

> I have the following bug report that has been sitting in my bug database
> for PHP3 for a while now:
>     I'm using the apache module version with apache 1.2.4. 
>     I have some scripts which call external programs, mostly
>     with System. When I start apache, the return value is
>     returned correctly for a while. After some time it is not,
>     -1 is returned. It might be a libc problem (I use glibc 
>     2.0.6, I am going to try with 2.0.7pre1 now), but I don't
>     think it is probable.
> A workaround which seems to fix this problem is to call 
> signal(SIGCHLD,SIG_DFL) in the PHP3 module.
> I am a bit confused about SIGCHLD handling in general.  Can I safely
> default this signal in an Apache module?  Should Apache do this
> automatically in child processes?
> -Rasmus

View raw message