Don't output a warning if kern.proc.auxv sysctl has returned EPERM.

After r228288 this is rather a normal situation.

MFC after:	1 week
This commit is contained in:
trociny 2011-12-05 19:39:15 +00:00
parent b9b4d81b8d
commit 85356b61d3

View File

@ -66,7 +66,7 @@ procstat_auxv(struct kinfo_proc *kipp)
name[3] = kipp->ki_pid;
len = sizeof(auxv) * sizeof(*auxv);
error = sysctl(name, 4, auxv, &len, NULL, 0);
if (error < 0 && errno != ESRCH) {
if (error < 0 && errno != ESRCH && errno != EPERM) {
warn("sysctl: kern.proc.auxv: %d: %d", kipp->ki_pid, errno);
return;
}