diff options
author | rwatson <rwatson@FreeBSD.org> | 2014-03-09 13:23:49 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2014-03-09 13:23:49 +0000 |
commit | f3010cfb7d9dbb4553d0cfa508ec09190a32fc7a (patch) | |
tree | 48547b123f9a0833d8c7a0d8546f475274eb05ce /lib/libprocstat/libprocstat.c | |
parent | d439a6998f1d72885e53e10c6a151e95fb821478 (diff) | |
download | FreeBSD-src-f3010cfb7d9dbb4553d0cfa508ec09190a32fc7a.zip FreeBSD-src-f3010cfb7d9dbb4553d0cfa508ec09190a32fc7a.tar.gz |
Merge r262690 from head to stable/10:
When querying a process's umask via sysctl in libprocstat(), don't
print a warning if EPERM is returned as this is an expected failure
mode rather than error -- similar to current handling of ESRCH.
This makes the output of 'procstat -as' vastly more palatable.
Sponsored by: DARPA, AFRL
Diffstat (limited to 'lib/libprocstat/libprocstat.c')
-rw-r--r-- | lib/libprocstat/libprocstat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libprocstat/libprocstat.c b/lib/libprocstat/libprocstat.c index e1ec7af..d8d39bb 100644 --- a/lib/libprocstat/libprocstat.c +++ b/lib/libprocstat/libprocstat.c @@ -2052,7 +2052,7 @@ procstat_getumask_sysctl(pid_t pid, unsigned short *maskp) mib[3] = pid; len = sizeof(*maskp); error = sysctl(mib, 4, maskp, &len, NULL, 0); - if (error != 0 && errno != ESRCH) + if (error != 0 && errno != ESRCH && errno != EPERM) warn("sysctl: kern.proc.umask: %d", pid); return (error); } |