forcing router exit without friendly cleanup for now until a socket bug is squashed
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 11 Mar 2008 22:03:28 +0000 (22:03 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 11 Mar 2008 22:03:28 +0000 (22:03 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1282 9efc2488-bf62-4759-914b-345cdb29e865

src/router/osrf_router_main.c

index 2dec185..30e4975 100644 (file)
@@ -9,6 +9,14 @@ static osrfRouter* router = NULL;
 
 void routerSignalHandler( int signo ) {
        osrfLogWarning( OSRF_LOG_MARK, "Received signal [%d], cleaning up...", signo );
+
+    /* for now, just forcibly exit.  This is not a friendly way to clean up, but
+     * there is a bug in osrfRouterFree() (in particular with cleaning up sockets),
+     * that can cause the router process to stick around.  If we do this, we 
+     * are guaranteed to exit.  
+     */
+    _exit(0);
+
        osrfConfigCleanup();
        osrfRouterFree(router);
        router = NULL;