[Asterisk-Dev] Module unloading

Paul Cadach paul at odt.east.telecom.kz
Sun Jul 4 19:02:26 MST 2004


Michael Sandee wrote:
> 1) Asterisk 1.2 could be years away... planned fixes don't fix my problem.

We could force unload cleanup before 1.2...

> 2) You can fix it at Asterisk's core... you think... but this might
> (will) break modules, and you get a *lot* higher chance of lockups. I
> think it is why it isn't implemented yet. Which is ok...

I'd done proper shutdown with clean module unloading at Asterisk-0.5.0 tree. There was not so hard to do so (one new
procedure to unload ALL modules, some fixes for shutdown process, and some fixes for unload_module() procedures to
cleanup all used resources where some things are missed).

> Several people actually already told me they had it wrong in their
> modules, apart from me... so that means something is wrong.

atexit() technique, may be, is more clean to understand, but will provide some additional overhead for module's core
work, so IMHO better is to cleanup unloading code instead of making some look-a-like scheme with atexit().


More information about the asterisk-dev mailing list