summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/gui/app.py
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2018-02-14 00:14:21 +0100
committerKali Kaneko <kali@leap.se>2018-02-15 16:36:51 +0100
commit96ba208a00617c462cbdd2802a3c97bc6ebb28f3 (patch)
tree0211c8d51597b6b27bd8148966591face0821875 /src/leap/bitmask/gui/app.py
parentc52b9f2356189cd09b5992886dbbda6bd7b60cd3 (diff)
[bug] remove stale pidfile
- Resolves: #9229
Diffstat (limited to 'src/leap/bitmask/gui/app.py')
-rw-r--r--src/leap/bitmask/gui/app.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/leap/bitmask/gui/app.py b/src/leap/bitmask/gui/app.py
index eb34f398..f22292b7 100644
--- a/src/leap/bitmask/gui/app.py
+++ b/src/leap/bitmask/gui/app.py
@@ -36,6 +36,7 @@ from leap.bitmask.gui.systray import WithTrayIcon
from leap.bitmask.gui.housekeeping import cleanup, terminate, reset_authtoken
from leap.bitmask.gui.housekeeping import get_authenticated_url
from leap.bitmask.gui.housekeeping import NoAuthTokenError
+from leap.bitmask.gui.housekeeping import check_stale_pidfile
from leap.common.config import get_path_prefix
@@ -195,16 +196,21 @@ def _handle_kill(*args, **kw):
closing = True
+def launch_backend():
+ global bitmaskd
+ check_stale_pidfile()
+ bitmaskd = Process(target=run_bitmaskd)
+ bitmaskd.start()
+
+
def launch_gui(with_window=True):
global qApp
- global bitmaskd
global browser
if IS_WIN:
freeze_support()
- bitmaskd = Process(target=run_bitmaskd)
- bitmaskd.start()
+ launch_backend()
qApp = QApplication([])
try:
browser = BrowserWindow(None)