Index: main/trunk/gli/src/org/greenstone/gatherer/Gatherer.java
===================================================================
--- main/trunk/gli/src/org/greenstone/gatherer/Gatherer.java	(revision 31813)
+++ main/trunk/gli/src/org/greenstone/gatherer/Gatherer.java	(revision 31814)
@@ -380,54 +380,46 @@
 				Configuration.setString("general.library_url", true, library_url_string);
 			}
-			else { // local greenstone: Start up the local library server, if that's what we want
+			else { // local greenstone: add shutdown hooks to forcibly stop the server on irregular termination
+			    // And start up the local library server, if that's what we want
+
+			    // The Java virtual machine shuts down in response to two kinds of events:
+			    // - The program exits normally, when the last non-daemon thread exits or when the exit (equivalently, System.exit) method is invoked, or
+			    // - The virtual machine is terminated in response to a user interrupt, such as typing ^C, or a system-wide event, such as user logoff or system shutdown.
+			    // https://coderanch.com/t/328888/java/Killing-process-spawned-Runtime-exec
+			    // So here we add a shutdown hook to take care of Ctrl-C situations where GLI is irregularly terminated
+			    // Sadly, the shutdownhook never gets called on Windows, whether GS2 or GS3,
+			    // when a Ctrl-C is sent to the DOS prompt that launched GLI. Because GLI on Windows
+			    // currently waits to respond to a Ctrl-C until AFTER GLI is already (properly) exited
+			    Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() {
+				    public void run() {
+					
+					if(Gatherer.exit != true) { // unexpected termination, such as Ctrl-C won't set Gatherer.exit
+					    // so still need to at least issue the call to stop any running GS server
+					    
+					    System.err.println("ShutDownHook called...");
+					    System.err.println("Attempting to forcibly terminate the GS server...");
+
+					    if (GS3) { // issue the ant call to stop any running GS3
+						// (tomcat and networked Derby Server) by calling GS3ServerThread.stopServer()
+						GS3ServerThread.stopServer();
+					    } else { // issue the call to stop any running GS2 local library server
+						if (LocalLibraryServer.isRunning() == true) {
+						    LocalLibraryServer.forceStopServer();
+						}
+					    }
+					}
+				    }
+				}));
+					
+			    
 				if (!GS3) {		
-					isLocalLibrary = LocalLibraryServer.start(gsdl_path, local_library_path);
-
-					// Add a shutdown hook to take care of Ctrl-C situations
-					// Sadly, neither the shutdownhook for GS3 nor for GS2 ever gets called on Windows
-					// when a Ctrl-C is sent to the DOS prompt that launched GLI:
-					// GLI on Windows currently waits to respond to a Ctrl-C until after GLI is already (properly) exited
-					Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() {
-						public void run() {
-
-						    if(Gatherer.exit != true) { // unexpected termination, such as Ctrl-C won't set Gatherer.exit
-							// so still need to at least issue the call to stop any running GS2 local library server
-							System.err.println("ShutDownHook called...");
-							System.err.println("Attempting to forcibly terminate the GS2 server...");
-							
-							if (LocalLibraryServer.isRunning() == true) {
-							    LocalLibraryServer.forceStopServer();
-							}
-
-							
-						    } else {
-							System.err.println("Gatherer.exit is false");
-						    }
-						}
-					    }));
+					isLocalLibrary = LocalLibraryServer.start(gsdl_path, local_library_path);				
 					
 				}
-				else if (!isGsdlRemote) { // local GS3, start the local tomcat
+				else { // local GS3, start the local tomcat
 				    
 					GS3ServerThread thread = new GS3ServerThread(gsdl3_src_path, "restart");
 					thread.start();
 	
-					// The Java virtual machine shuts down in response to two kinds of events:
-					// - The program exits normally, when the last non-daemon thread exits or when the exit (equivalently, System.exit) method is invoked, or
-					// - The virtual machine is terminated in response to a user interrupt, such as typing ^C, or a system-wide event, such as user logoff or system shutdown.
-					// https://coderanch.com/t/328888/java/Killing-process-spawned-Runtime-exec
-					Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() {
-						public void run() {						    
-
-						    if(Gatherer.exit != true) { // unexpected termination, such as Ctrl-C won't set Gatherer.exit
-							// so still need to at least issue the ant call to stop any running GS3
-							// (tomcat and networked Derby Server) by calling GS3ServerThread.stopServer()
-							System.err.println("ShutDownHook called...");
-							System.err.println("Attempting to forcibly terminate the GS3 server...");
-							GS3ServerThread.stopServer();
-						    }
-						}
-					    }));
-					
 
 
