apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Hett <ste...@egosoft.com>
Subject Re: [PATCH] deadlocking condition with APR_HAS_THREADS
Date Thu, 02 Feb 2017 12:14:48 GMT
On 2/2/2017 12:52 PM, Branko Čibej wrote:
> On 01.02.2017 00:23, Stefan wrote:
>> Hi,
>>
>> the issue was discovered as part of tracing down a deadlock condition in
>> an SVN test [1].
>>
>> [...]
>>
>> In this particular case we create a couple of threads and before the
>> threads terminate the calling process terminates. At this point
>> apr_terminate() is called which got registered via the atexit()-call (as
>> suggested in the apr_terminate-documentation).
> This is incorrect. apr_terminate() is not called after the calling
> process terminates; that would make no sense at all: if there's no
> process, it cannot execute any code.
>
> Handlers registered with atexit() are called "when the program
> terminates normally": either when exit() is called, or when main()
> returns, and certainly _before_ the process terminates.
> [...]
>
Another example of my bad expression and usage of incorrect terminology. 
Sorry for that.
> In this particular case we create a couple of threads and before the
> threads terminate the calling process terminates.
This should actually read:
In this particular case we create a couple of threads and before these 
threads finish (i.e. before the threads get to return from their 
thread_pool_func() function) the process' main function returns.

Hope this makes a bit more sense now. :-)

Of cause you are absolutely correct that the process itself is still 
running at that point.

-- 
Regards,
Stefan Hett, Developer/Administrator

EGOSOFT GmbH, Heidestrasse 4, 52146 Würselen, Germany
Tel: +49 2405 4239970, www.egosoft.com
Geschäftsführer: Bernd Lehahn, Handelsregister Aachen HRB 13473


Mime
View raw message