lightdm-gtk-greeter-team team mailing list archive
-
lightdm-gtk-greeter-team team
-
Mailing list archive
-
Message #00389
[Merge] lp:~lightdm-gtk-greeter-team/lightdm-gtk-greeter/g_unix_signal_add into lp:lightdm-gtk-greeter
Simon Steinbeiß has proposed merging lp:~lightdm-gtk-greeter-team/lightdm-gtk-greeter/g_unix_signal_add into lp:lightdm-gtk-greeter.
Requested reviews:
Sean Davis (smd-seandavis)
For more details, see:
https://code.launchpad.net/~lightdm-gtk-greeter-team/lightdm-gtk-greeter/g_unix_signal_add/+merge/212746
This patch switches from the deprecated signal to g_unix_signal_add.
The problem of the greeter persisting into the session (as described in the bugreport mentioned in the commit) seems to be caused by a mix of RetainPermanent and the greeter not shutting down properly. According to Robert Ancell, this could be the case, because it's not safe to call pretty much anything from a signal handler. Instead, g_unix_signal_add runs from the main loop. ("LightDM would have sent you the signal, then the gtk_main_quit might have done something weird with a thread.")
--
https://code.launchpad.net/~lightdm-gtk-greeter-team/lightdm-gtk-greeter/g_unix_signal_add/+merge/212746
Your team LightDM Gtk+ Greeter Development Team is subscribed to branch lp:lightdm-gtk-greeter.
=== modified file 'src/lightdm-gtk-greeter.c'
--- src/lightdm-gtk-greeter.c 2014-03-12 00:05:02 +0000
+++ src/lightdm-gtk-greeter.c 2014-03-26 00:13:13 +0000
@@ -1812,12 +1812,6 @@
}
static void
-sigterm_cb (int signum)
-{
- gtk_main_quit();
-}
-
-static void
load_user_list (void)
{
const GList *items, *item;
@@ -2290,7 +2284,7 @@
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
- signal (SIGTERM, sigterm_cb);
+ g_unix_signal_add(SIGTERM, gtk_main_quit, NULL);
#if GTK_CHECK_VERSION (3, 0, 0)
#else
Follow ups