skip call to read where there is no data present
--- freeswitch/trunk/src/switch_console.c 2009-09-10 21:37:32 UTC (rev 14812)
+++ freeswitch/trunk/src/switch_console.c 2009-09-10 23:00:16 UTC (rev 14813)
@@ -878,6 +878,14 @@
break;
}
+ if (FD_ISSET(fileno(stdin), &efds)) {
+ continue;
+ }
+
+ if (!FD_ISSET(fileno(stdin), &rfds)) {
+ activity = 0;
+ }
+
if (activity == 0) {
fflush(stdout);
continue;