Re: [exim-dev] dlopen cleanup

Pàgina inicial
Delete this message
Reply to this message
Autor: David Saez Padros
Data:  
A: Tony Finch
CC: exim-dev
Assumpte: Re: [exim-dev] dlopen cleanup
Hi !!

>>> 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().


also tried it, but seems to not work when the process is terminated by
a kill signal.

> 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.


by now, it's not absolutely necessary for me to do a cleanup as
everything seems to work fine if i do not do a cleanup, nevertheless
maybe somebody could need it or in fact, it could be 'nice' to do it.
Having a cleanup function on exim called before every exec and on exit
(including terminating by signals) could be helpful.

--
Best regards ...

----------------------------------------------------------------
    David Saez Padros                http://www.ols.es
    On-Line Services 2000 S.L.       e-mail  david@???
    Pintor Vayreda 1                 telf    +34 902 50 29 75
    08184 Palau-Solita i Plegamans   movil   +34 670 35 27 53
----------------------------------------------------------------