Skip to content
Snippets Groups Projects
  • Corey Farrell's avatar
    fee929c8
    core: Remove non-critical cleanup from startup aborts. · fee929c8
    Corey Farrell authored
    When built-in components of Asterisk fail to start they cause the
    Asterisk startup to abort.  In these cases only the most critical
    cleanup should be performed - closing databases and terminating
    proceses.  These cleanups are registered using ast_register_atexit, all
    other cleanups should not be run during startup abort.
    
    The main reason for this change is that these cleanup procedures are
    untestable from the partially initialized states, if they fail it could
    prevent us from ever running the critical cleanup with ast_run_atexits.
    
    Create separate initialization for dns_core.c to be run unconditionally
    during startup instead of being initialized by the first dns resolver to
    be registered. This ensures that 'sched' is initialized before it can be
    potentially used.
    
    Replace ast_register_atexit with ast_register_cleanup in media_cache.c.
    There is no reason for this cleanup to happen unconditionally.
    
    Change-Id: Iecc2df98008b21509925ff16740bd5fa29527db3
    fee929c8
    History
    core: Remove non-critical cleanup from startup aborts.
    Corey Farrell authored
    When built-in components of Asterisk fail to start they cause the
    Asterisk startup to abort.  In these cases only the most critical
    cleanup should be performed - closing databases and terminating
    proceses.  These cleanups are registered using ast_register_atexit, all
    other cleanups should not be run during startup abort.
    
    The main reason for this change is that these cleanup procedures are
    untestable from the partially initialized states, if they fail it could
    prevent us from ever running the critical cleanup with ast_run_atexits.
    
    Create separate initialization for dns_core.c to be run unconditionally
    during startup instead of being initialized by the first dns resolver to
    be registered. This ensures that 'sched' is initialized before it can be
    potentially used.
    
    Replace ast_register_atexit with ast_register_cleanup in media_cache.c.
    There is no reason for this cleanup to happen unconditionally.
    
    Change-Id: Iecc2df98008b21509925ff16740bd5fa29527db3