Skip to content

Commit

Permalink
fix NetBSD: Process.connections() may return incomplete results if us…
Browse files Browse the repository at this point in the history
…ing oneshot() #1439
  • Loading branch information
giampaolo committed Feb 27, 2019
1 parent 4faef5b commit d180e25
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
=====
Expand Down
6 changes: 3 additions & 3 deletions psutil/_psbsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -807,9 +807,9 @@ def connections(self, kind='inet'):
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
Expand Down

0 comments on commit d180e25

Please sign in to comment.