From 249f715ad47666c3decd45772b294aab07bffefd Mon Sep 17 00:00:00 2001 From: JiahuiJiang Date: Thu, 6 Sep 2018 14:08:11 -0400 Subject: [PATCH] Fix parent process watcher thread (#416) * Fix parent process watcher thread * timer --- pyls/python_ls.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyls/python_ls.py b/pyls/python_ls.py index 2f9a37d9..4c7b5264 100644 --- a/pyls/python_ls.py +++ b/pyls/python_ls.py @@ -163,9 +163,9 @@ def watch_parent_process(pid): log.info("parent process %s is not alive", pid) self.m_exit() log.debug("parent process %s is still alive", pid) - threading.Timer(PARENT_PROCESS_WATCH_INTERVAL, watch_parent_process(pid)).start() + threading.Timer(PARENT_PROCESS_WATCH_INTERVAL, watch_parent_process, args=[pid]).start() - watching_thread = threading.Thread(target=watch_parent_process, args=[processId]) + watching_thread = threading.Thread(target=watch_parent_process, args=(processId,)) watching_thread.daemon = True watching_thread.start()