tech-x11 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Lua shared object asymmetry loading Xlib.




> Am 20.01.2019 um 10:14 schrieb Martin Husemann <martin%duskware.de@localhost>:
> 
> On Sun, Jan 20, 2019 at 10:06:33AM +0100, Marc Balmer wrote:
>> Why are atexit handlers run after dlclosing loaded libraries?  That sounds wrong to me, but is there a reason?
> 
> They are run at exit(1) time, the application (or in this case library)
> is responsible of removing them if it dlclose()s the library implementing
> them earlier.

So the _init / _fini functions in a shared library could handle that?  How can an atexit handler be unregistered?

fwiw, other operating systems unregister functions from a shared library automatically at dlclose() time (e.g. macOS)

> 
> However, this was a bug in the X libs and it has been fixed (AFAIR).

Yes, christos seems to have fixed it.

> 
> Martin



Home | Main Index | Thread Index | Old Index