rpms/metacity/F-12 metacity-dont-do-bad-stuff-on-sigterm.patch, 1.3, 1.4 metacity.spec, 1.211, 1.212
Ray Strode
rstrode at fedoraproject.org
Thu Nov 5 22:36:27 UTC 2009
Author: rstrode
Update of /cvs/pkgs/rpms/metacity/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv12484
Modified Files:
metacity-dont-do-bad-stuff-on-sigterm.patch metacity.spec
Log Message:
- One stab at the metacity patch
metacity-dont-do-bad-stuff-on-sigterm.patch:
main.c | 28 ++++++++++++++++++++++++++--
1 file changed, 26 insertions(+), 2 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.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- metacity-dont-do-bad-stuff-on-sigterm.patch 5 Nov 2009 19:50:07 -0000 1.3
+++ metacity-dont-do-bad-stuff-on-sigterm.patch 5 Nov 2009 22:36:27 -0000 1.4
@@ -1,18 +1,6 @@
-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..ab3b5f9 100644
---- a/src/core/main.c
-+++ b/src/core/main.c
+diff -up metacity-2.28.0/src/core/main.c.sigterm metacity-2.28.0/src/core/main.c
+--- metacity-2.28.0/src/core/main.c.sigterm 2009-11-05 14:53:40.599237201 -0500
++++ metacity-2.28.0/src/core/main.c 2009-11-05 17:28:18.601486344 -0500
@@ -67,6 +67,7 @@
#include <fcntl.h>
#include <locale.h>
@@ -21,8 +9,8 @@ index a36a396..ab3b5f9 100644
/**
* The exit code we'll return to our parent process when we eventually die.
-@@ -369,12 +370,23 @@ meta_finalize (void)
- CurrentTime); /* I doubt correct timestamps matter here */
+@@ -368,12 +369,24 @@ meta_finalize (void)
+ meta_session_shutdown ();
}
+static int sigterm_pipe_fds[2] = { -1, -1 };
@@ -33,6 +21,7 @@ index a36a396..ab3b5f9 100644
- meta_finalize ();
+ if (sigterm_pipe_fds[1] >= 0)
+ {
++ write (sigterm_pipe_fds[1], "", 1);
+ close (sigterm_pipe_fds[1]);
+ sigterm_pipe_fds[1] = -1;
+ }
@@ -42,12 +31,12 @@ index a36a396..ab3b5f9 100644
+static gboolean
+on_sigterm (void)
+{
-+ meta_quit (0);
++ meta_quit (META_EXIT_SUCCESS);
+ return FALSE;
}
static guint sigchld_signal_id = 0;
-@@ -422,6 +434,7 @@ main (int argc, char **argv)
+@@ -421,6 +434,7 @@ main (int argc, char **argv)
"Pango", "GLib-GObject", "GThread"
};
guint i;
@@ -55,7 +44,7 @@ index a36a396..ab3b5f9 100644
if (!g_thread_supported ())
g_thread_init (NULL);
-@@ -444,6 +457,15 @@ main (int argc, char **argv)
+@@ -443,6 +457,16 @@ main (int argc, char **argv)
g_strerror (errno));
#endif
@@ -66,11 +55,9 @@ index a36a396..ab3b5f9 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.211
retrieving revision 1.212
diff -u -p -r1.211 -r1.212
--- metacity.spec 5 Nov 2009 19:58:15 -0000 1.211
+++ metacity.spec 5 Nov 2009 22:36:27 -0000 1.212
@@ -3,7 +3,7 @@
Summary: Unobtrusive window manager
Name: metacity
Version: 2.28.0
-Release: 8%{?dist}
+Release: 9%{?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
@@ -201,6 +201,9 @@ fi
%{_mandir}/man1/metacity-window-demo.1.gz
%changelog
+* Thu Nov 05 2009 Ray Strode <rstrode at redhat.com> 2.28.0-9
+- One stab at the metacity patch
+
* 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
More information about the scm-commits
mailing list