From beb3dc8909fab3c64f5f90cd97e89df78d76d36a Mon Sep 17 00:00:00 2001 From: Julien Lamy Date: Fri, 1 Feb 2019 01:32:27 +0100 Subject: [PATCH] Fix crash due to zombie processes (#174) --- src/vorta/utils.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/vorta/utils.py b/src/vorta/utils.py index 2965a16a..49c7c740 100644 --- a/src/vorta/utils.py +++ b/src/vorta/utils.py @@ -266,7 +266,12 @@ def format_archive_name(profile, archive_name_tpl): def get_mount_points(repo_url): mount_points = {} for proc in psutil.process_iter(): - if proc.name() == 'borg' or proc.name().startswith('python'): + try: + name = proc.name() + except Exception: + # Getting the process name may fail (e.g. zombie process on macOS) + continue + if name == 'borg' or name.startswith('python'): if 'mount' not in proc.cmdline(): continue