[asterisk-commits] bbryant: branch 1.2 r72373 - /branches/1.2/asterisk.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Jun 27 18:22:13 CDT 2007
Author: bbryant
Date: Wed Jun 27 18:22:13 2007
New Revision: 72373
URL: http://svn.digium.com/view/asterisk?view=rev&rev=72373
Log:
Reinstating patch. This actually fixes the problem, however I was running a development branch without it and mistakenly thought it wasn't fixed.
Fixes issue #10010, and #9654: 100% CPU usage caused by an asterisk console losing it's controlling terminal.
Modified:
branches/1.2/asterisk.c
Modified: branches/1.2/asterisk.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/asterisk.c?view=diff&rev=72373&r1=72372&r2=72373
==============================================================================
--- branches/1.2/asterisk.c (original)
+++ branches/1.2/asterisk.c Wed Jun 27 18:22:13 2007
@@ -1816,6 +1816,9 @@
for(;;) {
ebuf = (char *)el_gets(el, &num);
+ if (!ebuf && write(1, "", 1) < 0)
+ break;
+
if (!ast_strlen_zero(ebuf)) {
if (ebuf[strlen(ebuf)-1] == '\n')
ebuf[strlen(ebuf)-1] = '\0';
@@ -2458,6 +2461,9 @@
for (;;) {
buf = (char *)el_gets(el, &num);
+ if (!buf && write(1, "", 1) < 0)
+ goto lostterm;
+
if (buf) {
if (buf[strlen(buf)-1] == '\n')
buf[strlen(buf)-1] = '\0';
@@ -2482,5 +2488,6 @@
monitor_sig_flags(NULL);
+lostterm:
return 0;
}
More information about the asterisk-commits
mailing list