[gnome-session/wip/laney/allow-early-exit-on-sigterm: 1/2] binary: Log a critical when our SIGTERM/SIGINT handler fails to log out
- From: Iain Lane <iainl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-session/wip/laney/allow-early-exit-on-sigterm: 1/2] binary: Log a critical when our SIGTERM/SIGINT handler fails to log out
- Date: Mon, 16 Dec 2019 09:13:53 +0000 (UTC)
commit 16f3e738f1e831c3af0f2b0718260601298af0ed
Author: Iain Lane <iainl gnome org>
Date: Tue Dec 10 12:37:31 2019 +0000
binary: Log a critical when our SIGTERM/SIGINT handler fails to log out
gnome-session/main.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/gnome-session/main.c b/gnome-session/main.c
index c9488823..152e60ed 100644
--- a/gnome-session/main.c
+++ b/gnome-session/main.c
@@ -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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]