diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2019-02-27 01:39:48 +0100 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2019-02-27 01:39:48 +0100 |
commit | d180e25b871c314614aa96eccadb0bcc0a5df676 (patch) | |
tree | e264dd13a775a83dbd046b03391fdf2b7979bc7c | |
parent | 4faef5bc430080e66a8254e0afb8951dc1931ebf (diff) | |
download | psutil-d180e25b871c314614aa96eccadb0bcc0a5df676.tar.gz |
fix NetBSD: Process.connections() may return incomplete results if using oneshot() #1439
-rw-r--r-- | HISTORY.rst | 2 | ||||
-rw-r--r-- | psutil/_psbsd.py | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/HISTORY.rst b/HISTORY.rst index 9fcc72f8..26eff418 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -37,6 +37,8 @@ XXXX-XX-XX and Process memory_maps() and memory_info_exe() ("uss" field). - 1432_: [Windows] Process.memory_info_ex()'s USS memory is miscalculated because we're not using the actual system PAGESIZE. +- 1439_: [NetBSD] Process.connections() may return incomplete results if using + oneshot() 5.5.1 ===== diff --git a/psutil/_psbsd.py b/psutil/_psbsd.py index 0581de29..a5c5a143 100644 --- a/psutil/_psbsd.py +++ b/psutil/_psbsd.py @@ -807,9 +807,9 @@ class Process(object): ret.append(nt) if OPENBSD: # On OpenBSD 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 + # in case the process is gone (and the returned list may be + # incomplete). Raise NSP if the process disappeared on us. + cext.proc_name(self.pid) return ret @wrap_exceptions |