Hello community,

here is the log from the commit of package gnome-screensaver for openSUSE:11.4
checked in at Fri Apr 8 23:29:06 CEST 2011.



--------
--- old-versions/11.4/all/gnome-screensaver/gnome-screensaver.changes   
2011-02-13 17:23:06.000000000 +0100
+++ 11.4/gnome-screensaver/gnome-screensaver.changes    2011-04-07 
04:11:59.000000000 +0200
@@ -1,0 +2,7 @@
+Thu Apr  7 01:43:50 UTC 2011 - [email protected]
+
+- Add gnome-screensaver-sigterm-handle.patch to avoid deadlock caused
+  by exit() in the SIGTERM handler of gnome-screensaver-dialog.
+  (bnc#676097)
+
+-------------------------------------------------------------------

Package does not exist at destination yet. Using Fallback 
old-versions/11.4/all/gnome-screensaver
Destination is old-versions/11.4/UPDATES/all/gnome-screensaver
calling whatdependson for 11.4-i586


New:
----
  gnome-screensaver-sigterm-handle.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gnome-screensaver.spec ++++++
--- /var/tmp/diff_new_pack.KQQ81n/_old  2011-04-08 23:28:37.000000000 +0200
+++ /var/tmp/diff_new_pack.KQQ81n/_new  2011-04-08 23:28:37.000000000 +0200
@@ -20,7 +20,7 @@
 
 Name:           gnome-screensaver
 Version:        2.30.2
-Release:        3
+Release:        13.<RELEASE14>
 Url:            http://www.gnome.org/
 Group:          System/GUI/GNOME
 License:        GPLv2+
@@ -37,6 +37,8 @@
 Patch10:        gnome-screensaver-finger-print.patch
 # PATCH-FIX-UPSTREAM gnome-screensaver-multihead-unlock.patch bnc#444157 
bgo#455118 [email protected]
 Patch12:        gnome-screensaver-multihead-unlock.patch
+# PATCH-FIX-OPENSUSE gnome-screensaver-sigterm-handle.patch bnc#676097 
[email protected]
+Patch13:        gnome-screensaver-sigterm-handle.patch
 BuildRequires:  Mesa-devel
 BuildRequires:  fdupes
 BuildRequires:  gnome-common
@@ -102,6 +104,7 @@
 # %patch8 -p1
 %patch10
 %patch12
+%patch13 -p1
 
 %build
 # gnome-common intltool are needed only here

++++++ gnome-screensaver-sigterm-handle.patch ++++++
diff --git a/src/gnome-screensaver-dialog.c b/src/gnome-screensaver-dialog.c
index 72325e1..b269842 100644
--- a/src/gnome-screensaver-dialog.c
+++ b/src/gnome-screensaver-dialog.c
@@ -30,6 +30,7 @@
 #include <sys/wait.h>
 #include <unistd.h>
 #include <signal.h>
+#include <errno.h>
 
 #ifdef WITH_LIBFPRINT
 #include <pthread.h>
@@ -550,13 +551,28 @@ popup_dialog_idle (void)
         return FALSE;
 }
 
+static int sigterm_pipe_fds[2] = { -1, -1 };
+
 static void
 handle_sigterm (int sig)
 {
+        if (sigterm_pipe_fds[1] >= 0) {
+                if (write (sigterm_pipe_fds[1], "", 1) == -1)
+                        g_printerr ("gnome-screensaver: write to sigterm_pipe 
failed.\n");
+                close (sigterm_pipe_fds[1]);
+                sigterm_pipe_fds[1] = -1;
+        }
+}
+
+static gboolean
+on_sigterm ()
+{
         if (xvkbd_running)
                 kill (xvkbd_pid, 9);
 
         exit (0);
+
+        return FALSE;
 }
 
 /*
@@ -703,6 +719,7 @@ main (int    argc,
 {
         GError *error = NULL;
         char   *nolock_reason = NULL;
+        GIOChannel *channel;
 
 #ifdef ENABLE_NLS
         bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
@@ -762,6 +779,16 @@ main (int    argc,
                 exit (1);
         }
 
+        if (pipe (sigterm_pipe_fds) != 0)
+                g_printerr ("Failed to create SIGTERM pipe: %s\n",
+                             g_strerror (errno));
+
+        channel = g_io_channel_unix_new (sigterm_pipe_fds[0]);
+        g_io_channel_set_flags (channel, G_IO_FLAG_NONBLOCK, NULL);
+        g_io_add_watch (channel, G_IO_IN, (GIOFunc) on_sigterm, NULL);
+        g_io_channel_set_close_on_unref (channel, TRUE);
+        g_io_channel_unref (channel);
+
         signal (SIGTERM, handle_sigterm);
 
         if (show_version) {

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to