aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-22 16:44:13 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-22 16:44:13 +0000
commit987d30d71feebcb4b07313a14292f0a663a19fa0 (patch)
treee05cbbf08f1b8aeaf012b0af91b9692f44f0aefd /main
parentad1c7b9b0940776b7d20169a355f0d1cab920861 (diff)
Merged revisions 288339 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r288339 | russell | 2010-09-22 11:39:16 -0500 (Wed, 22 Sep 2010) | 11 lines Fix a 100% CPU consumption problem when setting console=yes in asterisk.conf. The handling of -c and console=yes should be the same, but they were not. When you specify -c, it sets both a flag for console module and for asterisk not to fork() off into the background. The handling of console=yes only set console mode, so you would end up with a background process() trying to run the Asterisk console and freaking out since it didn't have anything to read input from. Thanks to beagles for reporting and helping debug the problem! ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@288340 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/asterisk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/asterisk.c b/main/asterisk.c
index d23cc49be..a4539d13c 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
@@ -2933,7 +2933,7 @@ static void ast_readconfig(void)
ast_set2_flag(&ast_options, ast_true(v->value), AST_OPT_FLAG_QUIET);
/* Run as console (-c at startup, implies nofork) */
} else if (!strcasecmp(v->name, "console")) {
- ast_set2_flag(&ast_options, ast_true(v->value), AST_OPT_FLAG_CONSOLE);
+ ast_set2_flag(&ast_options, ast_true(v->value), AST_OPT_FLAG_NO_FORK | AST_OPT_FLAG_CONSOLE);
/* Run with high priority if the O/S permits (-p at startup) */
} else if (!strcasecmp(v->name, "highpriority")) {
ast_set2_flag(&ast_options, ast_true(v->value), AST_OPT_FLAG_HIGH_PRIORITY);