[arch-commits] Commit in xfce4-session/trunk (4 files)

Evangelos Foutras foutrelis at nymeria.archlinux.org
Sun May 5 17:50:24 UTC 2013


    Date: Sunday, May 5, 2013 @ 19:50:24
  Author: foutrelis
Revision: 184293

upgpkg: xfce4-session 4.10.1-1

New upstream release.

Modified:
  xfce4-session/trunk/PKGBUILD
Deleted:
  xfce4-session/trunk/xfce4-session-4.10.0-add-systemd-support.patch
  xfce4-session/trunk/xfce4-session-4.10.0-store-the-watch-function-id.patch
  xfce4-session/trunk/xfce4-session-4.10.0-use-the-async-spawn-function-of-glib.patch

-----------------------------------------------------------------+
 PKGBUILD                                                        |   29 
 xfce4-session-4.10.0-add-systemd-support.patch                  |  388 ----------
 xfce4-session-4.10.0-store-the-watch-function-id.patch          |   26 
 xfce4-session-4.10.0-use-the-async-spawn-function-of-glib.patch |   79 --
 4 files changed, 4 insertions(+), 518 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2013-05-05 17:49:14 UTC (rev 184292)
+++ PKGBUILD	2013-05-05 17:50:24 UTC (rev 184293)
@@ -3,8 +3,8 @@
 # Contributor: tobias <tobias funnychar archlinux.org>
 
 pkgname=xfce4-session
-pkgver=4.10.0
-pkgrel=7
+pkgver=4.10.1
+pkgrel=1
 pkgdesc="A session manager for Xfce"
 arch=('i686' 'x86_64')
 url="http://www.xfce.org/"
@@ -20,30 +20,9 @@
 replaces=('xfce-utils')
 options=('!libtool')
 install=$pkgname.install
-source=(http://archive.xfce.org/src/xfce/$pkgname/4.10/$pkgname-$pkgver.tar.bz2
-        xfce4-session-4.10.0-add-systemd-support.patch
-        xfce4-session-4.10.0-use-the-async-spawn-function-of-glib.patch
-        xfce4-session-4.10.0-store-the-watch-function-id.patch)
-sha256sums=('bb8aa9a74c3d382840596fb4875144d66c7f3f47c8e9ee81d31e3428a72c46ce'
-            'ffae61c48a4bd0cb51d422cb93f2de9567abaf29085370c455ef349b6a10234b'
-            '18ed175dd4242e39161a093045c6c6aebf9a408350652bde1454fe07411cdf3c'
-            '5eb5319a38f58a2d518d0e3d24b6d01c487871711fb36b55cb03a10a4591cdcf')
+source=(http://archive.xfce.org/src/xfce/$pkgname/4.10/$pkgname-$pkgver.tar.bz2)
+sha256sums=('0154fabdc398798c3445374ccc52a2f5bcb2d867fc94bc54114395b24f9cfc83')
 
-prepare() {
-  cd "$srcdir/$pkgname-$pkgver"
-
-  # https://bugzilla.xfce.org/show_bug.cgi?id=8729
-  patch -Np1 -i "$srcdir/xfce4-session-4.10.0-add-systemd-support.patch"
-
-  # https://bugzilla.xfce.org/show_bug.cgi?id=9709
-  patch -Np1 -i "$srcdir/xfce4-session-4.10.0-use-the-async-spawn-function-of-glib.patch"
-  patch -Np1 -i "$srcdir/xfce4-session-4.10.0-store-the-watch-function-id.patch"
-
-  sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' configure.in
-
-  xdt-autogen
-}
-
 build() {
   cd "$srcdir/$pkgname-$pkgver"
 

Deleted: xfce4-session-4.10.0-add-systemd-support.patch
===================================================================
--- xfce4-session-4.10.0-add-systemd-support.patch	2013-05-05 17:49:14 UTC (rev 184292)
+++ xfce4-session-4.10.0-add-systemd-support.patch	2013-05-05 17:50:24 UTC (rev 184293)
@@ -1,388 +0,0 @@
-diff --git a/xfce4-session/xfsm-systemd.c b/xfce4-session/xfsm-systemd.c
-index 4076586..90e7873 100644
---- /dev/null
-+++ b/xfce4-session/xfsm-systemd.c
-@@ -0,0 +1,123 @@
-+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
-+ *
-+ * Copyright (C) 2012 Christian Hesse
-+ *
-+ * Licensed under the GNU General Public License Version 2
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-+ */
-+
-+#include <config.h>
-+
-+#include <gio/gio.h>
-+#include <polkit/polkit.h>
-+
-+#include "xfsm-systemd.h"
-+
-+#define SYSTEMD_DBUS_NAME       "org.freedesktop.login1"
-+#define SYSTEMD_DBUS_PATH       "/org/freedesktop/login1"
-+#define SYSTEMD_DBUS_INTERFACE  "org.freedesktop.login1.Manager"
-+#define SYSTEMD_REBOOT_ACTION   "org.freedesktop.login1.reboot"
-+#define SYSTEMD_SHUTDOWN_ACTION "org.freedesktop.login1.power-off"
-+
-+struct _SystemdProxy {
-+        PolkitAuthority *authority;
-+        PolkitSubject *subject;
-+};
-+
-+SystemdProxy *
-+systemd_proxy_new (void)
-+{
-+        SystemdProxy *proxy;
-+
-+        proxy = g_new0 (SystemdProxy, 1);
-+
-+        proxy->authority = polkit_authority_get_sync (NULL, NULL);
-+        proxy->subject = polkit_unix_process_new (getpid());
-+
-+        return proxy;
-+}
-+
-+void
-+systemd_proxy_free (SystemdProxy *proxy)
-+{
-+        g_object_unref (proxy->authority);
-+        g_object_unref (proxy->subject);
-+
-+        g_free (proxy);
-+}
-+
-+gboolean systemd_proxy_can_method (SystemdProxy *proxy, gboolean *can_method, const gchar *method, GError **error)
-+{
-+        PolkitAuthorizationResult *res;
-+        GError *local_error = NULL;
-+
-+        *can_method = FALSE;
-+        res = polkit_authority_check_authorization_sync (proxy->authority,
-+                                                         proxy->subject,
-+                                                         method,
-+                                                         NULL,
-+                                                         POLKIT_CHECK_AUTHORIZATION_FLAGS_NONE,
-+                                                         NULL,
-+                                                         &local_error);
-+        if (res == NULL) {
-+                g_propagate_error (error, local_error);
-+                return FALSE;
-+        }
-+
-+        *can_method = polkit_authorization_result_get_is_authorized (res) ||
-+                       polkit_authorization_result_get_is_challenge (res);
-+
-+        g_object_unref (res);
-+
-+        return TRUE;
-+}
-+
-+gboolean systemd_proxy_can_restart (SystemdProxy *proxy, gboolean *can_restart, GError **error)
-+{
-+	return systemd_proxy_can_method(proxy, can_restart, SYSTEMD_REBOOT_ACTION, error);
-+}
-+
-+gboolean systemd_proxy_can_shutdown (SystemdProxy *proxy, gboolean *can_shutdown, GError **error)
-+{
-+	return systemd_proxy_can_method(proxy, can_shutdown, SYSTEMD_SHUTDOWN_ACTION, error);
-+}
-+
-+gboolean systemd_proxy_method (SystemdProxy *proxy, const gchar *method, GError **error)
-+{
-+        GDBusConnection *bus;
-+
-+        bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, NULL);
-+        g_dbus_connection_call_sync (bus,
-+                                     SYSTEMD_DBUS_NAME,
-+                                     SYSTEMD_DBUS_PATH,
-+                                     SYSTEMD_DBUS_INTERFACE,
-+                                     method,
-+                                     g_variant_new ("(b)", TRUE),
-+                                     NULL, 0, G_MAXINT, NULL, NULL);
-+        g_object_unref (bus);
-+
-+        return TRUE;
-+}
-+
-+gboolean systemd_proxy_restart (SystemdProxy *proxy, GError **error)
-+{
-+	return systemd_proxy_method(proxy, "Reboot", error);
-+}
-+
-+gboolean systemd_proxy_shutdown (SystemdProxy *proxy, GError **error)
-+{
-+	return systemd_proxy_method(proxy, "PowerOff", error);
-+}
-diff --git a/xfce4-session/xfsm-systemd.h b/xfce4-session/xfsm-systemd.h
-index 3fa8317..2c4d868 100644
---- /dev/null
-+++ b/xfce4-session/xfsm-systemd.h
-@@ -0,0 +1,42 @@
-+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
-+ *
-+ * Copyright (C) 2012 Christian Hesse
-+ *
-+ * Licensed under the GNU General Public License Version 2
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-+ */
-+
-+#ifndef __SYSTEMD_PROXY_H__
-+#define __SYSTEMD_PROXY_H__
-+
-+#include <glib.h>
-+
-+G_BEGIN_DECLS
-+
-+typedef struct _SystemdProxy SystemdProxy;
-+
-+SystemdProxy *systemd_proxy_new (void);
-+void          systemd_proxy_free (SystemdProxy *proxy);
-+gboolean      systemd_proxy_can_method (SystemdProxy *proxy, gboolean *can_method, const char *method, GError **error);
-+gboolean      systemd_proxy_can_restart (SystemdProxy *proxy, gboolean *can_restart, GError **error);
-+gboolean      systemd_proxy_can_shutdown (SystemdProxy *proxy, gboolean *can_shutdown, GError **error);
-+gboolean      systemd_proxy_method (SystemdProxy *proxy, const char *method, GError **error);
-+gboolean      systemd_proxy_restart (SystemdProxy *proxy, GError **error);
-+gboolean      systemd_proxy_shutdown (SystemdProxy *proxy, GError **error);
-+
-+G_END_DECLS
-+
-+#endif  /* __SYSTEMD_PROXY_H__ */
-
-commit 518a28c23f110617aad36e64c02cdab6a36adf37
-Author: Christian Hesse <eworm at leda.eworm.de>
-Date:   Fri Jul 27 14:21:14 2012 +0200
-
-    ...
-
-diff --git a/configure.in.in b/configure.in.in
-index 9aa4f8f..aa0b8bb 100644
---- a/configure.in
-+++ b/configure.in
-@@ -96,6 +96,33 @@ XDT_CHECK_PACKAGE([DBUS], [dbus-1], [1.1.0])
- XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [0.84])
- XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.9.0])
- 
-+dnl systemd integration
-+AC_ARG_ENABLE([systemd],
-+              AS_HELP_STRING([--enable-systemd], [Use systemd]),
-+              [with_systemd=$enableval],
-+              [with_systemd=auto])
-+PKG_CHECK_MODULES(SYSTEMD,
-+                  [libsystemd-login polkit-gobject-1],
-+                  [have_systemd=yes], [have_systemd=no])
-+AC_MSG_CHECKING([whether to use systemd])
-+if test x$with_systemd = xauto ; then
-+        if test x$have_systemd = xno ; then
-+                with_systemd=no
-+        else
-+                with_systemd=yes
-+        fi
-+fi
-+AC_MSG_RESULT($with_systemd)
-+if test x$with_systemd = xyes; then
-+        if test x$have_systemd = xno; then
-+                AC_MSG_ERROR([Systemd support explicitly required, but systemd not found])
-+        fi
-+        AC_DEFINE(HAVE_SYSTEMD, 1, [Define if systemd is used for session tracking])
-+fi
-+AC_SUBST(SYSTEMD_CFLAGS)
-+AC_SUBST(SYSTEMD_LIBS)
-+AM_CONDITIONAL(WITH_SYSTEMD, [test "$with_systemd" = "yes"], [Using systemd])
-+
- dnl Check for debugging support
- XDT_FEATURE_DEBUG([xfsm_debug_default])
- 
-
-commit f1279eba9452f027a2037be77388767437161d51
-Author: Christian Hesse <eworm at leda.eworm.de>
-Date:   Fri Jul 27 14:18:16 2012 +0200
-
-    ...
-
-diff --git a/xfce4-session/xfsm-shutdown.c b/xfce4-session/xfsm-shutdown.c
-index 1429abd..077cdf3 100644
---- a/xfce4-session/xfsm-shutdown.c
-+++ b/xfce4-session/xfsm-shutdown.c
-@@ -96,7 +96,11 @@ struct _XfsmShutdown
- {
-   GObject __parent__;
- 
-+#ifdef HAVE_SYSTEMD
-+  SystemdProxy   *systemd_proxy;
-+#else
-   XfsmConsolekit *consolekit;
-+#endif
-   XfsmUPower     *upower;
- 
-   /* kiosk settings */
-@@ -134,7 +138,11 @@ xfsm_shutdown_init (XfsmShutdown *shutdown)
- {
-   XfceKiosk *kiosk;
- 
-+#ifdef HAVE_SYSTEMD
-+  shutdown->systemd_proxy = systemd_proxy_new ();
-+#else
-   shutdown->consolekit = xfsm_consolekit_get ();
-+#endif
-   shutdown->upower = xfsm_upower_get ();
-   shutdown->helper_state = SUDO_NOT_INITIAZED;
-   shutdown->helper_require_password = FALSE;
-@@ -153,7 +161,11 @@ xfsm_shutdown_finalize (GObject *object)
- {
-   XfsmShutdown *shutdown = XFSM_SHUTDOWN (object);
- 
-+#ifdef HAVE_SYSTEMD
-+  systemd_proxy_free (shutdown->systemd_proxy);
-+#else
-   g_object_unref (G_OBJECT (shutdown->consolekit));
-+#endif
-   g_object_unref (G_OBJECT (shutdown->upower));
- 
-   /* close down helper */
-@@ -644,7 +656,11 @@ xfsm_shutdown_try_restart (XfsmShutdown  *shutdown,
-   if (shutdown->helper_state == SUDO_AVAILABLE)
-     return xfsm_shutdown_sudo_try_action (shutdown, XFSM_SHUTDOWN_RESTART, error);
-   else
-+#ifdef HAVE_SYSTEMD
-+    return systemd_proxy_restart (shutdown->systemd_proxy, error);
-+#else
-     return xfsm_consolekit_try_restart (shutdown->consolekit, error);
-+#endif
- }
- 
- 
-@@ -661,7 +677,11 @@ xfsm_shutdown_try_shutdown (XfsmShutdown  *shutdown,
-   if (shutdown->helper_state == SUDO_AVAILABLE)
-     return xfsm_shutdown_sudo_try_action (shutdown, XFSM_SHUTDOWN_SHUTDOWN, error);
-   else
-+#ifdef HAVE_SYSTEMD
-+    return systemd_proxy_shutdown (shutdown->systemd_proxy, error);
-+#else
-     return xfsm_consolekit_try_shutdown (shutdown->consolekit, error);
-+#endif
- }
- 
- 
-@@ -701,7 +721,11 @@ xfsm_shutdown_can_restart (XfsmShutdown  *shutdown,
-       return TRUE;
-     }
- 
-+#ifdef HAVE_SYSTEMD
-+  if (systemd_proxy_can_restart (shutdown->systemd_proxy, can_restart, error))
-+#else
-   if (xfsm_consolekit_can_restart (shutdown->consolekit, can_restart, error))
-+#endif
-     return TRUE;
- 
-   if (xfsm_shutdown_sudo_init (shutdown, error))
-@@ -728,7 +752,11 @@ xfsm_shutdown_can_shutdown (XfsmShutdown  *shutdown,
-       return TRUE;
-     }
- 
-+#ifdef HAVE_SYSTEMD
-+  if (systemd_proxy_can_shutdown (shutdown->systemd_proxy, can_shutdown, error))
-+#else
-   if (xfsm_consolekit_can_shutdown (shutdown->consolekit, can_shutdown, error))
-+#endif
-     return TRUE;
- 
-   if (xfsm_shutdown_sudo_init (shutdown, error))
-
-commit 5aea3fb853683246a537a67423cf5b32076b8dfb
-Author: Christian Hesse <eworm at leda.eworm.de>
-Date:   Fri Jul 27 14:03:27 2012 +0200
-
-    ...
-
-diff --git a/xfce4-session/Makefile.am b/xfce4-session/Makefile.am
-index c015154..7e3b311 100644
---- a/xfce4-session/Makefile.am
-+++ b/xfce4-session/Makefile.am
-@@ -38,8 +38,6 @@ xfce4_session_SOURCES =							\
- 	xfsm-compat-gnome.h						\
- 	xfsm-compat-kde.c						\
- 	xfsm-compat-kde.h						\
--	xfsm-consolekit.c						\
--	xfsm-consolekit.h						\
- 	xfsm-dns.c							\
- 	xfsm-dns.h							\
- 	xfsm-error.c							\
-@@ -65,6 +63,16 @@ xfce4_session_SOURCES =							\
- 	xfsm-upower.c							\
- 	xfsm-upower.h
- 
-+if WITH_SYSTEMD
-+xfce4_session_SOURCES +=						\
-+	xfsm-systemd.c							\
-+	xfsm-systemd.h
-+else
-+xfce4_session_SOURCES +=						\
-+	xfsm-consolekit.c						\
-+	xfsm-consolekit.h
-+endif
-+
- xfce4_session_CFLAGS =							\
- 	$(LIBSM_CFLAGS)							\
- 	$(LIBX11_CFLAGS)						\
-@@ -72,6 +80,7 @@ xfce4_session_CFLAGS =							\
- 	$(DBUS_CFLAGS)							\
- 	$(DBUS_GLIB_CFLAGS)						\
- 	$(LIBWNCK_CFLAGS)						\
-+	$(SYSTEMD_CFLAGS)						\
- 	$(XFCONF_CFLAGS)						\
- 	$(GMODULE_CFLAGS)						\
- 	$(PLATFORM_CFLAGS)
-@@ -91,6 +100,7 @@ xfce4_session_LDADD =							\
- 	$(DBUS_LIBS)							\
- 	$(DBUS_GLIB_LIBS)						\
- 	$(LIBWNCK_LIBS)							\
-+	$(SYSTEMD_LIBS)							\
- 	$(XFCONF_LIBS)							\
- 	-lm
- 
-diff --git a/xfce4-session/xfsm-shutdown.c b/xfce4-session/xfsm-shutdown.c
-index d8757a8..1429abd 100644
---- a/xfce4-session/xfsm-shutdown.c
-+++ b/xfce4-session/xfsm-shutdown.c
-@@ -66,10 +66,13 @@
- #include <xfce4-session/xfsm-fadeout.h>
- #include <xfce4-session/xfsm-global.h>
- #include <xfce4-session/xfsm-legacy.h>
--#include <xfce4-session/xfsm-consolekit.h>
- #include <xfce4-session/xfsm-upower.h>
- 
--
-+#ifdef HAVE_SYSTEMD
-+#include <xfce4-session/xfsm-systemd.h>
-+#else
-+#include <xfce4-session/xfsm-consolekit.h>
-+#endif
- 
- static void xfsm_shutdown_finalize  (GObject      *object);
- static void xfsm_shutdown_sudo_free (XfsmShutdown *shutdown);

Deleted: xfce4-session-4.10.0-store-the-watch-function-id.patch
===================================================================
--- xfce4-session-4.10.0-store-the-watch-function-id.patch	2013-05-05 17:49:14 UTC (rev 184292)
+++ xfce4-session-4.10.0-store-the-watch-function-id.patch	2013-05-05 17:50:24 UTC (rev 184293)
@@ -1,26 +0,0 @@
-From ab391138cacc62ab184a338e237c4430356b41f9 Mon Sep 17 00:00:00 2001
-From: Nick Schermer <nick at xfce.org>
-Date: Fri, 26 Apr 2013 18:05:10 +0000
-Subject: Store the watch function id to avoid possible double free (bug #9709).
-
----
-diff --git a/xfce4-session/xfsm-startup.c b/xfce4-session/xfsm-startup.c
-index e43c53c..c621397 100644
---- a/xfce4-session/xfsm-startup.c
-+++ b/xfce4-session/xfsm-startup.c
-@@ -903,9 +903,10 @@ xfsm_startup_start_properties (XfsmProperties *properties,
-   child_watch_data = g_new0 (XfsmStartupData, 1);
-   child_watch_data->manager = g_object_ref (manager);
-   child_watch_data->properties = properties;
--  g_child_watch_add_full (G_PRIORITY_LOW, properties->pid,
--                          xfsm_startup_child_watch, child_watch_data,
--                          (GDestroyNotify) xfsm_startup_data_free);
-+  child_watch_data->properties->child_watch_id =
-+      g_child_watch_add_full (G_PRIORITY_LOW, properties->pid,
-+                              xfsm_startup_child_watch, child_watch_data,
-+                              (GDestroyNotify) xfsm_startup_data_free);
- 
-   /* set a timeout -- client must register in a a certain amount of time
-    * or it's assumed to be broken/have issues. */
---
-cgit v0.9.1

Deleted: xfce4-session-4.10.0-use-the-async-spawn-function-of-glib.patch
===================================================================
--- xfce4-session-4.10.0-use-the-async-spawn-function-of-glib.patch	2013-05-05 17:49:14 UTC (rev 184292)
+++ xfce4-session-4.10.0-use-the-async-spawn-function-of-glib.patch	2013-05-05 17:50:24 UTC (rev 184293)
@@ -1,79 +0,0 @@
-From dee0200fa5dc4de064f288281ddd13199ba7fcde Mon Sep 17 00:00:00 2001
-From: Nick Schermer <nick at xfce.org>
-Date: Fri, 26 Apr 2013 17:46:29 +0000
-Subject: Use the async spawn function of glib.
-
----
-diff --git a/xfce4-session/xfsm-startup.c b/xfce4-session/xfsm-startup.c
-index 911eec6..e43c53c 100644
---- a/xfce4-session/xfsm-startup.c
-+++ b/xfce4-session/xfsm-startup.c
-@@ -864,6 +864,7 @@ xfsm_startup_start_properties (XfsmProperties *properties,
-   gint             n;
-   const gchar     *current_directory;
-   GPid             pid;
-+  GError          *error = NULL;
- 
-   /* release any possible old resources related to a previous startup */
-   xfsm_properties_set_default_child_watch (properties);
-@@ -878,44 +879,28 @@ xfsm_startup_start_properties (XfsmProperties *properties,
- 
-   current_directory = xfsm_properties_get_string (properties, SmCurrentDirectory);
- 
--  /* fork a new process for the application */
--#ifdef HAVE_VFORK
--  /* vfork() doesn't allow you to do anything but call exec*() or _exit(),
--   * so if we need to set the working directory, we can't use vfork() */
--  if (current_directory == NULL)
--    pid = vfork ();
--  else
--#endif
--    pid = fork ();
--
--  /* handle the child process */
--  if (pid == 0)
-+  if (!g_spawn_async (current_directory,
-+                      argv, NULL,
-+                      G_SPAWN_DO_NOT_REAP_CHILD | G_SPAWN_SEARCH_PATH,
-+                      NULL, NULL,
-+                      &pid, &error))
-     {
--      /* execute the application here */
--      if (current_directory)
--        {
--          if (chdir (current_directory))
--            g_warning ("Unable to chdir to \"%s\": %s", current_directory, strerror (errno));
--        }
--      execvp (argv[0], argv);
--      _exit (127);
--    }
--
--  /* cleanup */
--  g_strfreev (argv);
-+      g_warning ("Unable to launch \"%s\": %s",
-+                 *argv, error->message);
-+      g_error_free (error);
-+      g_strfreev (argv);
- 
--  /* check if we failed to fork */
--  if (G_UNLIKELY (pid < 0))
--    {
--      /* tell the user that we failed to fork */
--      perror ("Failed to fork new process");
-       return FALSE;
-     }
- 
-+  xfsm_verbose ("Launched command \"%s\" with PID %dn", *argv, (gint) pid);
-+
-+  g_strfreev (argv);
-+
-   properties->pid = pid;
- 
-   /* set a watch to make sure the child doesn't quit before registering */
--  child_watch_data = g_new (XfsmStartupData, 1);
-+  child_watch_data = g_new0 (XfsmStartupData, 1);
-   child_watch_data->manager = g_object_ref (manager);
-   child_watch_data->properties = properties;
-   g_child_watch_add_full (G_PRIORITY_LOW, properties->pid,
---
-cgit v0.9.1




More information about the arch-commits mailing list