Don't start the event processing thread until after forking.
authorRussell Bryant <russell@russellbryant.com>
Thu, 20 Sep 2007 16:27:07 +0000 (16:27 +0000)
committerRussell Bryant <russell@russellbryant.com>
Thu, 20 Sep 2007 16:27:07 +0000 (16:27 +0000)
(reported by Simon on the -dev list, thanks!)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83233 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/asterisk.c

index 5cc0339..4636cf8 100644 (file)
@@ -2541,7 +2541,6 @@ int main(int argc, char *argv[])
        ast_alaw_init();
        callerid_init();
        ast_builtins_init();
-       ast_event_init();
        ast_utils_init();
        tdd_init();
        /* When Asterisk restarts after it has dropped the root privileges,
@@ -2841,6 +2840,8 @@ int main(int argc, char *argv[])
        if (test_for_thread_safety())
                ast_verbose("Warning! Asterisk is not thread safe.\n");
 
+       ast_event_init();
+
        ast_makesocket();
        sigemptyset(&sigs);
        sigaddset(&sigs, SIGHUP);