From owner-svn-src-all@FreeBSD.ORG Sun Mar 9 13:23:50 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4088EC70; Sun, 9 Mar 2014 13:23:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2C6A9962; Sun, 9 Mar 2014 13:23:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s29DNoSZ058859; Sun, 9 Mar 2014 13:23:50 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s29DNosk058858; Sun, 9 Mar 2014 13:23:50 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201403091323.s29DNosk058858@svn.freebsd.org> From: Robert Watson Date: Sun, 9 Mar 2014 13:23:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262947 - stable/10/lib/libprocstat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Mar 2014 13:23:50 -0000 Author: rwatson Date: Sun Mar 9 13:23:49 2014 New Revision: 262947 URL: http://svnweb.freebsd.org/changeset/base/262947 Log: 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 Modified: stable/10/lib/libprocstat/libprocstat.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libprocstat/libprocstat.c ============================================================================== --- stable/10/lib/libprocstat/libprocstat.c Sun Mar 9 13:19:37 2014 (r262946) +++ stable/10/lib/libprocstat/libprocstat.c Sun Mar 9 13:23:49 2014 (r262947) @@ -2052,7 +2052,7 @@ procstat_getumask_sysctl(pid_t pid, unsi 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); }