apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@attglobal.net>
Subject Re: Problem with child reaping on Tru64
Date Thu, 18 Apr 2002 14:48:00 GMT
Dave Hill <David.D.Hill@Compaq.com> writes:

> Hi all,
>         I have run into a problem on Compaq Tru64 with cgi processes
> being reaped when using with mpm worker.
> 
>         I had always thought the signal(SIGCHLD,SIG_IGN) would always
> cause child processes to quietly go away but....

This patch looks reasonable to me.  Any comments from others?

We may need to eventually add support for systems with no
SA_NOCLDWAIT.  Some such systems may leave zombies when SIGCHLD is
SIG_IGN-ored.

For that case we'd need to set a handler to reap (and ignore) the
status.

> *** srclib/apr/threadproc/unix/signals.c.orig   Tue Apr 16 18:22:07 2002
> 
> --- srclib/apr/threadproc/unix/signals.c        Wed Apr 17 10:03:48 2002
> 
> ***************
> *** 105,110 ****
> --- 105,116 ----
>   #ifdef SA_INTERRUPT             /* SunOS */
>       act.sa_flags |= SA_INTERRUPT;
>   #endif
> + #ifdef SA_NOCLDWAIT
> +     /* this is required on Tru64 to cause child processes to
> +        disapear gracefully - XPG4 compatible */
> +     if((signo == SIGCHLD) && (func == SIG_IGN))
> +       act.sa_flags |= SA_NOCLDWAIT;
> + #endif
>       if (sigaction(signo, &act, &oact) < 0)
>           return SIG_ERR;
>       return oact.sa_handler;

-- 
Jeff Trawick | trawick@attglobal.net
Born in Roswell... married an alien...

Mime
View raw message