apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Bannert <aa...@clove.org>
Subject Re: cvs commit: apr/test testthread.c
Date Fri, 19 Jul 2002 21:38:09 GMT
On Fri, Jul 19, 2002 at 02:25:13PM -0700, Justin Erenkrantz wrote:
> On Fri, Jul 19, 2002 at 05:49:24PM -0000, bnicholes@apache.org wrote:
> >   @@ -186,6 +186,8 @@
> >        }
> >        printf("OK\n");
> >    
> >   +    apr_terminate();
> >   +
> >        return 0;
> >    }
> 
> The proper thing to do is:
> 
> atexit(apr_terminate);
> 
> at the beginning of the program (notably near the apr_initialize
> call).  -- justin

That's not what httpd does. OTOH APR's test and httpd's support binaries
do register the atexit call. So what's the right way to do this and
what kinds of problems can we expect from the atexit() version?

Ryan and I were just having this discussion the other day regarding
SIGINT from a Ctrl-C keypress from many shells. The feeling was that
we wouldn't expect the cleanups to run for SIGINT, since we don't
(or shouldn't be) catching that signal in Apache. Is this incorrect?

-aaron

Mime
View raw message