rpms/metacity/F-12 metacity-dont-do-bad-stuff-on-sigterm.patch, 1.2, 1.3 metacity.spec, 1.209, 1.210

Ray Strode rstrode at fedoraproject.org
Thu Nov 5 19:50:08 UTC 2009


Author: rstrode

Update of /cvs/pkgs/rpms/metacity/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv16547

Modified Files:
	metacity-dont-do-bad-stuff-on-sigterm.patch metacity.spec 
Log Message:
- Minor clean ups to last patch based on feedback from
  Owen


metacity-dont-do-bad-stuff-on-sigterm.patch:
 main.c |   27 ++++++++++++++++++++++++---
 1 file changed, 24 insertions(+), 3 deletions(-)

Index: metacity-dont-do-bad-stuff-on-sigterm.patch
===================================================================
RCS file: /cvs/pkgs/rpms/metacity/F-12/metacity-dont-do-bad-stuff-on-sigterm.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- metacity-dont-do-bad-stuff-on-sigterm.patch	5 Nov 2009 19:41:23 -0000	1.2
+++ metacity-dont-do-bad-stuff-on-sigterm.patch	5 Nov 2009 19:50:07 -0000	1.3
@@ -1,5 +1,16 @@
+From 591b6db8204864157f77e6c6cbaab0fa10416334 Mon Sep 17 00:00:00 2001
+From: Ray Strode <rstrode at redhat.com>
+Date: Thu, 5 Nov 2009 14:47:47 -0500
+Subject: [PATCH] Don't call meta_finalize from SIGTERM handler
+
+It's not a legal function to call from a signal handler.
+Instead defer until going back to the main loop.
+---
+ src/core/main.c |   26 ++++++++++++++++++++++++--
+ 1 files changed, 24 insertions(+), 2 deletions(-)
+
 diff --git a/src/core/main.c b/src/core/main.c
-index a36a396..5f21172 100644
+index a36a396..ab3b5f9 100644
 --- a/src/core/main.c
 +++ b/src/core/main.c
 @@ -67,6 +67,7 @@
@@ -10,7 +21,7 @@ index a36a396..5f21172 100644
  
  /**
   * The exit code we'll return to our parent process when we eventually die.
-@@ -369,12 +370,22 @@ meta_finalize (void)
+@@ -369,12 +370,23 @@ meta_finalize (void)
                          CurrentTime); /* I doubt correct timestamps matter here */
  }
  
@@ -28,14 +39,15 @@ index a36a396..5f21172 100644
 +}
  
 -  exit (meta_exit_code);
-+static void
++static gboolean
 +on_sigterm (void)
 +{
 +  meta_quit (0);
++  return FALSE;
  }
  
  static guint sigchld_signal_id = 0;
-@@ -422,6 +433,7 @@ main (int argc, char **argv)
+@@ -422,6 +434,7 @@ main (int argc, char **argv)
      "Pango", "GLib-GObject", "GThread"
    };
    guint i;
@@ -43,7 +55,7 @@ index a36a396..5f21172 100644
  
    if (!g_thread_supported ())
      g_thread_init (NULL);
-@@ -444,6 +456,16 @@ main (int argc, char **argv)
+@@ -444,6 +457,15 @@ main (int argc, char **argv)
                  g_strerror (errno));
  #endif
  
@@ -54,9 +66,11 @@ index a36a396..5f21172 100644
 +  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);
 +
    act.sa_handler = &sigterm_handler;
    if (sigaction (SIGTERM, &act, NULL) < 0)
      g_printerr ("Failed to register SIGTERM handler: %s\n",
+-- 
+1.6.5.2
+


Index: metacity.spec
===================================================================
RCS file: /cvs/pkgs/rpms/metacity/F-12/metacity.spec,v
retrieving revision 1.209
retrieving revision 1.210
diff -u -p -r1.209 -r1.210
--- metacity.spec	5 Nov 2009 19:33:25 -0000	1.209
+++ metacity.spec	5 Nov 2009 19:50:08 -0000	1.210
@@ -1,7 +1,7 @@
 Summary: Unobtrusive window manager
 Name: metacity
 Version: 2.28.0
-Release: 7%{?dist}
+Release: 8%{?dist}
 URL: http://download.gnome.org/sources/metacity/
 Source0: http://download.gnome.org/sources/metacity/2.28/metacity-%{version}.tar.bz2
 # http://bugzilla.gnome.org/show_bug.cgi?id=558723
@@ -199,6 +199,10 @@ fi
 %{_mandir}/man1/metacity-window-demo.1.gz
 
 %changelog
+* Thu Nov 05 2009 Ray Strode <rstrode at redhat.com> 2.28.0-8
+- Minor clean ups to last patch based on feedback from
+  Owen
+
 * Thu Nov 05 2009 Ray Strode <rstrode at redhat.com> 2.28.0-7
 - Don't do bad things on sigterm
 




More information about the fedora-extras-commits mailing list