From 6adf26f14dbe2ed0addd5d07910c3b5546005987 Mon Sep 17 00:00:00 2001 From: Corey Farrell Date: Thu, 26 Mar 2015 22:19:21 +0000 Subject: Replace most uses of ast_register_atexit with ast_register_cleanup. Since 'core stop now' and 'core restart now' do not stop modules, it is unsafe for most of the core to run cleanups. Originally all cleanups used ast_register_atexit, and were only changed when it was shown to be unsafe. ast_register_atexit is now used only when absolutely required to prevent corruption and close child processes. Exceptions that need to use ast_register_atexit: * CDR: Flush records. * res_musiconhold: Kill external applications. * AstDB: Close the DB. * canary_exit: Kill canary process. ASTERISK-24142 #close Reported by: David Brillert ASTERISK-24683 #close Reported by: Peter Katzmann ASTERISK-24805 #close Reported by: Badalian Vyacheslav ASTERISK-24881 #close Reported by: Corey Farrell Review: https://reviewboard.asterisk.org/r/4500/ Review: https://reviewboard.asterisk.org/r/4501/ ........ Merged revisions 433495 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433497 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/features.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main/features.c') diff --git a/main/features.c b/main/features.c index 870c57f1a..deb28ee0f 100644 --- a/main/features.c +++ b/main/features.c @@ -1185,7 +1185,7 @@ int ast_features_init(void) if (res) { features_shutdown(); } else { - ast_register_atexit(features_shutdown); + ast_register_cleanup(features_shutdown); } return res; -- cgit v1.2.3