> Am 20.01.2019 um 11:14 schrieb Kamil Rytarowski <n...@gmx.com>:
>
> On 20.01.2019 11:03, Martin Husemann wrote:
>> On Sun, Jan 20, 2019 at 10:32:43AM +0100, Kamil Rytarowski wrote:
>>> I find it as workaround of our libc behavior.
>>
>> I disagree, there is no clean way to implement the call-on-dlclose
>> semantics (i.e. it needs disgusting ld.elf_so hacks and layer violations).
>>
>> But maybe we should document the __cxa_atexit interface or provide a
>> public version?
>>
>
> libc++abi does not support a public interface to __cxa_atexit.
>
> It's also documented as being an internal API, so in my opinion without
> need for a documentation. It could be mentioned in atexit(3).
One could argue that libraries should not use atexit() at all, but use _fini()
to their clean up tasks. Dunno hwo portable that is, however.