From 14aadf6eda678e6a2e53fb9aadf4f68ae26d7f07 Mon Sep 17 00:00:00 2001 From: chrys Date: Fri, 7 Sep 2018 19:50:10 +0200 Subject: [PATCH] make socket uniqe --- src/fenrirscreenreader/core/remoteManager.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/fenrirscreenreader/core/remoteManager.py b/src/fenrirscreenreader/core/remoteManager.py index 3ebefa64..51f3e7dd 100644 --- a/src/fenrirscreenreader/core/remoteManager.py +++ b/src/fenrirscreenreader/core/remoteManager.py @@ -62,7 +62,10 @@ class remoteManager(): # /run/user//fenrirscreenreader/daemon # socket pty # /run/user//fenrirscreenreader/ptyX - socketpath = '/tmp/fenrir-deamon.sock' + if self.env['runtime']['settingsManager'].getSetting('screen', 'driver') =='vcsaDriver': + socketpath = '/tmp/fenrirscreenreader-deamon.sock' + else: + socketpath = '/tmp/fenrirscreenreader-' + str(os.getpid()) + '.sock' if os.path.exists(socketpath): os.remove(socketpath) self.sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) @@ -147,7 +150,7 @@ class remoteManager(): self.defineWindow(parameterText) # reset window if upperCommandText.startswith(self.resetWindowConst): - self.resetWindow() + self.resetWindow() def defineWindow(self, windowText): start = {} end = {}