Merge lp:~lightdm-gtk-greeter-team/lightdm-gtk-greeter/g_unix_signal_add into lp:~lightdm-gtk-greeter-team/lightdm-gtk-greeter/trunk

Proposed by Simon Steinbeiß
Status: Merged
Merged at revision: 265
Proposed branch: lp:~lightdm-gtk-greeter-team/lightdm-gtk-greeter/g_unix_signal_add
Merge into: lp:~lightdm-gtk-greeter-team/lightdm-gtk-greeter/trunk
Diff against target: 25 lines (+1/-7)
1 file modified
src/lightdm-gtk-greeter.c (+1/-7)
To merge this branch: bzr merge lp:~lightdm-gtk-greeter-team/lightdm-gtk-greeter/g_unix_signal_add
Reviewer Review Type Date Requested Status
Sean Davis Pending
Review via email: mp+212746@code.launchpad.net

Description of the change

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.")

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== 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 @@
1812}1812}
18131813
1814static void1814static void
1815sigterm_cb (int signum)
1816{
1817 gtk_main_quit();
1818}
1819
1820static void
1821load_user_list (void)1815load_user_list (void)
1822{1816{
1823 const GList *items, *item;1817 const GList *items, *item;
@@ -2290,7 +2284,7 @@
2290 bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");2284 bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
2291 textdomain (GETTEXT_PACKAGE);2285 textdomain (GETTEXT_PACKAGE);
22922286
2293 signal (SIGTERM, sigterm_cb);2287 g_unix_signal_add(SIGTERM, gtk_main_quit, NULL);
22942288
2295#if GTK_CHECK_VERSION (3, 0, 0)2289#if GTK_CHECK_VERSION (3, 0, 0)
2296#else2290#else

Subscribers

People subscribed via source and target branches