On Wed, 2017-02-01 at 00:23 +0100, Stefan wrote:
> Hi,
> 
> the issue was discovered as part of tracing down a deadlock condition in
> an SVN test [1].
> 
> As far as I understand it, the problem lies in the C-standard not
> explicitly defining when a function registered with atexit() is called
> in the context of thread termination [2].

I had no idea atexit() was called on thread termination.  I guess the
manpage must be misleading in telling us it happens at process exit? 

>     atexit(apr_terminate);
>     apr_initialize();

That whole widely-used idiom looks deeply suspect if multiple
thread exits will each invoke the atexit!  Are you sure this
isn't just a platform bug?  In which case, a patch should perhaps
live in platform-specific code?

-- 
Nick Kew

Reply via email to