Re: [exim-dev] dlopen cleanup

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Tony Finch
Data:  
Para: David Saez Padros
CC: Tony Finch, exim-dev
Asunto: Re: [exim-dev] dlopen cleanup
On Thu, 1 Jun 2006, David Saez Padros wrote:

> > static void cleanup(void) __attribute__((destructor));
>
> Seems that this does not work, maybe it's because exim does not call
> dlclose for every dlopened library


That ought to happen automatically when the program calls exit. Another
way to set up a cleanup function is to use atexit().

One thing that might be causing your problem is that Exim frequently calls
exec() which doesn't invoke the usual exit cleanups. If you want some
cleanup to occur in this situation then you're out of luck: you'll have to
do it eagerly rather than lazily. This shouldn't cause much extra work
since Exim's processes are usually short-lived.

Tony.
--
<fanf@???> <dot@???> http://dotat.at/ ${sg{\N${sg{\
N\}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}\
\N}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}