[gnome-settings-daemon] plugins: Don't leak DESKTOP_AUTOSTART_ID into child processes
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] plugins: Don't leak DESKTOP_AUTOSTART_ID into child processes
- Date: Tue, 2 Apr 2019 12:29:43 +0000 (UTC)
commit b8f302dd93483160e05f6473845c923495a2090a
Author: Alexandr Miloslavskiy <alexandr miloslavskiy syntevo com>
Date: Mon Mar 18 11:47:03 2019 +0100
plugins: Don't leak DESKTOP_AUTOSTART_ID into child processes
This fixes error in applications started through media-keys:
Gtk-WARNING **: 17:48:33.761: Failed to register client:
GDBus.Error:org.gnome.SessionManager.AlreadyRegistered: Unable to register client
plugins/common/daemon-skeleton-gtk.h | 5 +++++
plugins/common/daemon-skeleton.h | 5 +++++
2 files changed, 10 insertions(+)
---
diff --git a/plugins/common/daemon-skeleton-gtk.h b/plugins/common/daemon-skeleton-gtk.h
index b140324c..d26d6950 100644
--- a/plugins/common/daemon-skeleton-gtk.h
+++ b/plugins/common/daemon-skeleton-gtk.h
@@ -162,6 +162,11 @@ register_with_gnome_session (void)
NULL,
(GAsyncReadyCallback) on_client_registered,
NULL);
+
+ /* DESKTOP_AUTOSTART_ID must not leak into child processes, because
+ * it can't be reused. Child processes will not know whether this is
+ * a genuine value or erroneous already-used value. */
+ g_unsetenv ("DESKTOP_AUTOSTART_ID");
}
static void
diff --git a/plugins/common/daemon-skeleton.h b/plugins/common/daemon-skeleton.h
index 1753c2f8..7f099927 100644
--- a/plugins/common/daemon-skeleton.h
+++ b/plugins/common/daemon-skeleton.h
@@ -161,6 +161,11 @@ register_with_gnome_session (GMainLoop *loop)
NULL,
(GAsyncReadyCallback) on_client_registered,
loop);
+
+ /* DESKTOP_AUTOSTART_ID must not leak into child processes, because
+ * it can't be reused. Child processes will not know whether this is
+ * a genuine value or erroneous already-used value. */
+ g_unsetenv ("DESKTOP_AUTOSTART_ID");
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]