Fix minor bugs in NodeStartupControllerApplication's SIGINT handler
authorJonathan Maw <jonathan.maw@codethink.co.uk>
Wed, 8 Aug 2012 14:53:08 +0000 (15:53 +0100)
committerJonathan Maw <jonathan.maw@codethink.co.uk>
Wed, 8 Aug 2012 15:10:44 +0000 (16:10 +0100)
The SIGINT handler did not cancel the LUCStarter, it does now.

The SIGINT handler made the application quit, but the asynchronous
call to deregister its shutdown consumer from the Node State Manager
does that when it is finished.

NEWS
node-startup-controller/node-startup-controller-application.c

diff --git a/NEWS b/NEWS
index cb94f51..f564bf5 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,8 @@ x.y.z
 * Add documentation for the WatchdogClient class
 * License the reference manual under Creative Commons CC0 1.0
   Universal (CC0 1.0)
+* Fixed NodeStartupControllerApplication's SIGINT handler redundantly
+  quitting the application and not cancelling the LUCStarter.
 
 0.9.1
 =====
index 4b637e2..94f3eff 100644 (file)
@@ -573,15 +573,15 @@ node_startup_controller_application_handle_sigterm (gpointer user_data)
 
   g_return_val_if_fail (IS_NODE_STARTUP_CONTROLLER_APPLICATION (application), FALSE);
 
+  /* cancel the LUC startup */
+  luc_starter_cancel (application->luc_starter);
+
   /* deregister the shutdown consumers of legacy applications */
   la_handler_service_deregister_consumers (application->la_handler);
 
   /* unregister the shutdown client for the app itself */
   node_startup_controller_application_unregister_shutdown_consumer (application);
 
-  /* quit the application */
-  g_main_loop_quit (application->main_loop);
-
   /* reset the source ID */
   application->sigterm_id = 0;