[asterisk-commits] bbryant: trunk r72384 - in /trunk: ./ main/asterisk.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jun 27 18:30:31 CDT 2007


Author: bbryant
Date: Wed Jun 27 18:30:31 2007
New Revision: 72384

URL: http://svn.digium.com/view/asterisk?view=rev&rev=72384
Log:
Merged revisions 72383 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r72383 | bbryant | 2007-06-27 18:29:14 -0500 (Wed, 27 Jun 2007) | 11 lines

Merged revisions 72373 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r72373 | bbryant | 2007-06-27 18:22:13 -0500 (Wed, 27 Jun 2007) | 3 lines

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:
    trunk/   (props changed)
    trunk/main/asterisk.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/main/asterisk.c
URL: http://svn.digium.com/view/asterisk/trunk/main/asterisk.c?view=diff&rev=72384&r1=72383&r2=72384
==============================================================================
--- trunk/main/asterisk.c (original)
+++ trunk/main/asterisk.c Wed Jun 27 18:30:31 2007
@@ -2232,6 +2232,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';
@@ -2958,6 +2961,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';
@@ -2980,5 +2986,6 @@
 
 	monitor_sig_flags(NULL);
 
+lostterm:
 	return 0;
 }




More information about the asterisk-commits mailing list