From 75f826eb11b2eabef212ddc141fd0aef6b1ca08f Mon Sep 17 00:00:00 2001 From: Michael Terry Date: Wed, 30 Apr 2014 14:37:27 -0400 Subject: [PATCH] Only delete socket if we're about to use it --- debian/lightdm.upstart | 1 - src/unity-system-compositor.c | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/lightdm.upstart b/debian/lightdm.upstart index 663f9ead..9395ad56 100644 --- a/debian/lightdm.upstart +++ b/debian/lightdm.upstart @@ -45,7 +45,6 @@ script fi fi - rm -f /tmp/mir_socket exec lightdm end script diff --git a/src/unity-system-compositor.c b/src/unity-system-compositor.c index 7ba95e42..ed31a394 100644 --- a/src/unity-system-compositor.c +++ b/src/unity-system-compositor.c @@ -417,6 +417,9 @@ unity_system_compositor_start (DisplayServer *server) process_set_env (compositor->priv->process, "LD_LIBRARY_PATH", g_getenv ("LD_LIBRARY_PATH")); } + /* Delete a potential stale socket before USC tries to use it */ + g_unlink (compositor->priv->socket); + /* Generate command line to run */ absolute_command = get_absolute_command (compositor->priv->command); if (!absolute_command) -- 2.39.2