Verified Commit 16f3e738 authored by Iain Lane's avatar Iain Lane

binary: Log a critical when our SIGTERM/SIGINT handler fails to log out

parent 2bb33887
......@@ -103,12 +103,17 @@ on_name_lost (GDBusConnection *connection,
static gboolean
term_or_int_signal_cb (gpointer data)
g_autoptr(GError) error = NULL;
GsmManager *manager = (GsmManager *)data;
/* let the fatal signals interrupt us */
g_debug ("Caught SIGINT/SIGTERM, shutting down normally.");
gsm_manager_logout (manager, GSM_MANAGER_LOGOUT_MODE_FORCE, NULL);
gsm_manager_logout (manager, GSM_MANAGER_LOGOUT_MODE_FORCE, &error);
if (error != NULL) {
g_critical ("Failed to log out: %s", error->message);
return FALSE;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment