summaryrefslogtreecommitdiff
path: root/psutil/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'psutil/__init__.py')
-rw-r--r--psutil/__init__.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/psutil/__init__.py b/psutil/__init__.py
index 6036cbe9..2b0b3c6b 100644
--- a/psutil/__init__.py
+++ b/psutil/__init__.py
@@ -626,7 +626,12 @@ class Process(object):
# Examples are "gnome-keyring-d" vs. "gnome-keyring-daemon".
try:
cmdline = self.cmdline()
- except AccessDenied:
+ except (AccessDenied, ZombieProcess):
+ # Just pass and return the truncated name: it's better
+ # than nothing. Note: there are actual cases where a
+ # zombie process can return a name() but not a
+ # cmdline(), see:
+ # https://github.com/giampaolo/psutil/issues/2239
pass
else:
if cmdline: