[PATCH] Fix quick_exit to match C++11 specification.

Carlos O'Donell carlos@redhat.com
Tue Jun 7 00:22:00 GMT 2016


On 06/05/2016 11:13 AM, Florian Weimer wrote:
> On 06/04/2016 05:54 AM, Carlos O'Donell wrote:
> Do we really need a new version?  Is it correct to version
> quick_exit? Would it be more correct to version
> __cxa_thread_atexit_impl instead because whether the destructor runs
> at thread exit seems more like a property of the code that registers
> the destructor, than the code that invokes quick_exit?

I don't quite follow.

It is the call to exit, _Exit/_exit, or quick_exit which decides
the sequence of process termination actions.

Particularly in C++ the quick_exit call must not run destructors
for thread local objects, since the standard mandates that.

Changing __cxa_thread_atexit_impl would be more complicated than
just changing quick_exit.

-- 
Cheers,
Carlos.



More information about the Libc-alpha mailing list