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
1=== modified file 'src/lightdm-gtk-greeter.c'
2--- src/lightdm-gtk-greeter.c 2014-03-12 00:05:02 +0000
3+++ src/lightdm-gtk-greeter.c 2014-03-26 00:13:13 +0000
4@@ -1812,12 +1812,6 @@
5 }
6
7 static void
8-sigterm_cb (int signum)
9-{
10- gtk_main_quit();
11-}
12-
13-static void
14 load_user_list (void)
15 {
16 const GList *items, *item;
17@@ -2290,7 +2284,7 @@
18 bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
19 textdomain (GETTEXT_PACKAGE);
20
21- signal (SIGTERM, sigterm_cb);
22+ g_unix_signal_add(SIGTERM, gtk_main_quit, NULL);
23
24 #if GTK_CHECK_VERSION (3, 0, 0)
25 #else

Subscribers

People subscribed via source and target branches