[Opensrf-commits] r1839 - trunk/src/router (scottmk)

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Nov 2 19:00:59 EST 2009


Author: scottmk
Date: 2009-11-02 19:00:59 -0500 (Mon, 02 Nov 2009)
New Revision: 1839

Modified:
   trunk/src/router/osrf_router.c
Log:
In the main loop of the router: if the select call fails for
any reason other than an harmless signal (i.e. one whose
handler didn't set a switch to stop the loop), then break
out of the loop and terminate.

The old code would ignore the error and keep looping, using up
ca. 98% of the CPU until somebody killed it.

M    src/router/osrf_router.c


Modified: trunk/src/router/osrf_router.c
===================================================================
--- trunk/src/router/osrf_router.c	2009-11-02 23:21:52 UTC (rev 1838)
+++ trunk/src/router/osrf_router.c	2009-11-03 00:00:59 UTC (rev 1839)
@@ -195,9 +195,9 @@
 				else
 					continue;    // Irrelevant signal; ignore it
 			} else {
-				osrfLogWarning( OSRF_LOG_MARK,
-						"Top level select call failed with errno %d", errno);
-				continue;
+				osrfLogWarning( OSRF_LOG_MARK, "Top level select call failed with errno %d: %s",
+						errno, strerror( errno ) );
+				break;
 			}
 		}
 



More information about the opensrf-commits mailing list