Hello community, here is the log from the commit of package metacity for openSUSE:Factory checked in at Tue Jan 12 09:28:08 CET 2010. -------- --- GNOME/metacity/metacity.changes 2009-12-02 12:03:34.000000000 +0100 +++ /mounts/work_src_done/STABLE/metacity/metacity.changes 2009-12-16 16:15:43.000000000 +0100 @@ -1,0 +2,6 @@ +Wed Dec 16 16:13:31 CET 2009 - sbrabec@suse.cz + +- Fix a race condition that causes that gdm autologin sometimes + never completes (bnc#555027, bgo#600864). + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- metacity-race-autologin-cleanup.patch metacity-race-autologin.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ metacity.spec ++++++ --- /var/tmp/diff_new_pack.Ms5G1z/_old 2010-01-12 09:27:38.000000000 +0100 +++ /var/tmp/diff_new_pack.Ms5G1z/_new 2010-01-12 09:27:38.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package metacity (Version 2.28.0) # -# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -33,12 +33,16 @@ License: GPLv2+ Group: System/GUI/GNOME Version: 2.28.0 -Release: 2 +Release: 3 Summary: A Fast Window Manager for the GNOME 2.x Desktop Source: %{name}-%{version}.tar.bz2 Patch: metacity-ping-timeout.patch # PATCH-FIX-OPENSUSE metacity-bnc385553-buggy-intel-xinerama.diff bnc385553 federico@novell.com - Sanitize overlapping (cloned) monitors from Xinerama Patch11: metacity-bnc385553-buggy-intel-xinerama.diff +# PATCH-FIX-UPSTREAM metacity-race-autologin.patch bnc555027 bgo600864 sbrabec@suse.cz -- Fix race condition during autologin. +Patch12: metacity-race-autologin.patch +# PATCH-FIX-UPSTREAM metacity-race-autologin-cleanup.patch bnc555027 bgo600864 sbrabec@suse.cz -- Fix -Werror warning in the previous patch. +Patch13: metacity-race-autologin-cleanup.patch Url: http://www.gnome.org BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires: zenity @@ -72,6 +76,8 @@ translation-update-upstream %patch -p1 %patch11 -p1 +%patch12 -p1 +%patch13 -p1 %build %configure\ ++++++ metacity-race-autologin-cleanup.patch ++++++ Index: metacity-2.28.0/src/core/main.c =================================================================== --- metacity-2.28.0.orig/src/core/main.c +++ metacity-2.28.0/src/core/main.c @@ -377,7 +377,8 @@ sigterm_handler (int signum) { if (sigterm_pipe_fds[1] >= 0) { - write (sigterm_pipe_fds[1], "", 1); + if (write (sigterm_pipe_fds[1], "", 1)) + { /* Ignoring of write() return value is safe here. */ } close (sigterm_pipe_fds[1]); sigterm_pipe_fds[1] = -1; } ++++++ metacity-race-autologin.patch ++++++
From ac912d42181d9d5a2714f2f9f9098fedc9b2b806 Mon Sep 17 00:00:00 2001 From: Ray Strode <rstrode@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. https://bugzilla.gnome.org/show_bug.cgi?id=600864 --- src/core/main.c | 28 ++++++++++++++++++++++++++-- 1 files changed, 26 insertions(+), 2 deletions(-) diff --git a/src/core/main.c b/src/core/main.c index a36a396..509c650 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -67,6 +67,7 @@ #include <fcntl.h> #include <locale.h> #include <time.h> +#include <unistd.h> /** * The exit code we'll return to our parent process when we eventually die. @@ -369,12 +370,24 @@ meta_finalize (void) CurrentTime); /* I doubt correct timestamps matter here */ } +static int sigterm_pipe_fds[2] = { -1, -1 }; + static void sigterm_handler (int signum) { - meta_finalize (); + if (sigterm_pipe_fds[1] >= 0) + { + write (sigterm_pipe_fds[1], "", 1); + close (sigterm_pipe_fds[1]); + sigterm_pipe_fds[1] = -1; + } +} - exit (meta_exit_code); +static gboolean +on_sigterm (void) +{ + meta_quit (META_EXIT_SUCCESS); + return FALSE; } static guint sigchld_signal_id = 0; @@ -422,6 +435,7 @@ main (int argc, char **argv) "Pango", "GLib-GObject", "GThread" }; guint i; + GIOChannel *channel; if (!g_thread_supported ()) g_thread_init (NULL); @@ -444,6 +458,16 @@ main (int argc, char **argv) g_strerror (errno)); #endif + 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); + act.sa_handler = &sigterm_handler; if (sigaction (SIGTERM, &act, NULL) < 0) g_printerr ("Failed to register SIGTERM handler: %s\n", -- 1.6.5.2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org