From ada3afff191a9781b1109ef4a30b541c9bfeb09d Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Sun, 1 Jul 2018 12:00:09 +0200
Subject: [PATCH 60/83] =?UTF-8?q?server:=20Try=20to=20remove=20a=20pre?=
 =?UTF-8?q?=C3=ABxisting=20shm=20file.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This should have been removed even if wineserver was killed, but if someone
uses SIGKILL or something similar we should try to handle that gracefully.
---
 server/esync.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/server/esync.c b/server/esync.c
index 4fb42e6f9..a2f828173 100644
--- a/server/esync.c
+++ b/server/esync.c
@@ -84,6 +84,8 @@ void esync_init(void)
     else
         sprintf( shm_name, "/wine-%lx-esync", (unsigned long)st.st_ino );
 
+    shm_unlink( shm_name );
+
     shm_fd = shm_open( shm_name, O_RDWR | O_CREAT | O_EXCL, 0644 );
     if (shm_fd == -1)
         perror( "shm_open" );
-- 
2.20.1

