Author: kelnos Date: 2008-11-06 23:49:52 +0000 (Thu, 06 Nov 2008) New Revision: 28636
Modified: xfce4-settings/trunk/xfce4-settings-helper/main.c Log: use XfcePosixSignalHandler instead of calling gtk_main_quit() from a signal handler; that may not be safe... Modified: xfce4-settings/trunk/xfce4-settings-helper/main.c =================================================================== --- xfce4-settings/trunk/xfce4-settings-helper/main.c 2008-11-06 17:53:23 UTC (rev 28635) +++ xfce4-settings/trunk/xfce4-settings-helper/main.c 2008-11-06 23:49:52 UTC (rev 28636) @@ -64,7 +64,8 @@ static void -signal_handler (gint signum) +signal_handler (gint signum, + gpointer user_data) { /* quit the main loop */ gtk_main_quit (); @@ -165,8 +166,11 @@ workspaces_helper = g_object_new (XFCE_TYPE_WORKSPACES_HELPER, NULL); /* setup signal handlers to properly quit the main loop */ - for (i = 0; i < G_N_ELEMENTS (signums); i++) - signal (signums[i], signal_handler); + if (xfce_posix_signal_handler_init (NULL)) + { + for (i = 0; i < G_N_ELEMENTS (signums); i++) + xfce_posix_signal_handler_set_handler (signums[i], signal_handler, NULL, NULL); + } /* enter the main loop */ gtk_main(); _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits