summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2016-01-08 09:36:34 +0000
committerGiampaolo Rodola <g.rodola@gmail.com>2016-01-08 09:36:34 +0000
commit842719aaba161c73068c26fe198d21bc29b44d28 (patch)
treee5457aa2bb9622b5b09b91ab79b512f887464447
parentab342f72e73c924a00525e6b1110fd9a62c524aa (diff)
downloadpsutil-842719aaba161c73068c26fe198d21bc29b44d28.tar.gz
#557 (NetBSD): cmdline - raise NSP or ZP as necessary
-rw-r--r--psutil/_psbsd.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/psutil/_psbsd.py b/psutil/_psbsd.py
index 8503bc12..7331b96b 100644
--- a/psutil/_psbsd.py
+++ b/psutil/_psbsd.py
@@ -467,6 +467,10 @@ class Process(object):
type = socktype_to_enum(type)
nt = _common.pconn(fd, fam, type, laddr, raddr, status)
ret.add(nt)
+ # On NetBSD the underlying C function does not raise NSP
+ # in case the process is gone (and the returned list may
+ # incomplete).
+ self.name() # raise NSP if the process disappeared on us
return list(ret)
families, types = conn_tmap[kind]