From 38a39592ca7d5bfd147b00f718dca73e454e65c4 Mon Sep 17 00:00:00 2001 From: scottmk Date: Tue, 3 Nov 2009 00:00:59 +0000 Subject: [PATCH 1/1] 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 git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1839 9efc2488-bf62-4759-914b-345cdb29e865 --- src/router/osrf_router.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/router/osrf_router.c b/src/router/osrf_router.c index 28bd36a..7e162b8 100644 --- a/src/router/osrf_router.c +++ b/src/router/osrf_router.c @@ -195,9 +195,9 @@ void osrfRouterRun( osrfRouter* router ) { 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; } } -- 2.43.2