Skip to content

Commit

Permalink
Fix macOS sysctl to get proper proc length
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewbauer committed Nov 3, 2017
1 parent e69a111 commit ceacd3e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/libutil/util.cc
Expand Up @@ -817,6 +817,7 @@ void killUser(uid_t uid)
err = sysctl((int *)name, 4, NULL, &length, NULL, 0);
if (err)
throw SysError("calling sysctl to get size");
length /= sizeof(struct kinfo_proc);

vector<struct kinfo_proc> proc_list(length);

Expand Down

0 comments on commit ceacd3e

Please sign in to comment.