Skip to content

Commit

Permalink
darwin_processes: optimize get_fds
Browse files Browse the repository at this point in the history
  • Loading branch information
doronz88 committed Feb 3, 2022
1 parent 71c511c commit faab0f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pyzshell/pyzshell/darwin_processes.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def get_fds(self, pid: int) -> Optional[list]:
result = []
size = self._client.symbols.proc_pidinfo(pid, PROC_PIDLISTFDS, 0, 0, 0)

vi_size = 4096
vi_size = vnode_fdinfowithpath.sizeof()
with self._client.safe_malloc(vi_size) as vi_buf:
with self._client.safe_malloc(size) as fdinfo_buf:
size = int(self._client.symbols.proc_pidinfo(pid, PROC_PIDLISTFDS, 0, fdinfo_buf, size))
Expand Down

0 comments on commit faab0f2

Please sign in to comment.