From owner-svn-src-all@FreeBSD.ORG Fri Dec 14 04:18:10 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BE15C8CD; Fri, 14 Dec 2012 04:18:10 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from fallbackmx08.syd.optusnet.com.au (fallbackmx08.syd.optusnet.com.au [211.29.132.10]) by mx1.freebsd.org (Postfix) with ESMTP id 490068FC08; Fri, 14 Dec 2012 04:18:09 +0000 (UTC) Received: from mail13.syd.optusnet.com.au (mail13.syd.optusnet.com.au [211.29.132.194]) by fallbackmx08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id qBE4I8m0012042; Fri, 14 Dec 2012 15:18:09 +1100 Received: from c122-106-175-26.carlnfd1.nsw.optusnet.com.au (c122-106-175-26.carlnfd1.nsw.optusnet.com.au [122.106.175.26]) by mail13.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id qBE4HsTW027059 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 14 Dec 2012 15:17:57 +1100 Date: Fri, 14 Dec 2012 15:17:54 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Pawel Jakub Dawidek Subject: Re: svn commit: r244154 - head/bin/ps In-Reply-To: <20121213213147.GA1401@garage.freebsd.pl> Message-ID: <20121214151047.X973@besplex.bde.org> References: <201212121545.qBCFj4Hl086444@svn.freebsd.org> <20121212210652.GO3013@kib.kiev.ua> <20121213111240.GB1381@garage.freebsd.pl> <20121213161242.GE71906@kib.kiev.ua> <20121213165541.GD1381@garage.freebsd.pl> <20121213181621.GG71906@kib.kiev.ua> <20121213213147.GA1401@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.0 cv=BrrFWvr5 c=1 sm=1 a=WqmuCUZ0mQMA:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=URALeSCvvZIA:10 a=6I5d2MoRAAAA:8 a=uS_ZUP-777TR7mEKaZ4A:9 a=CjuIK1q_8ugA:10 a=2ekcOSppvVBNGPxY:21 a=QDnF1dTDgF_j9QlS:21 a=bxQHXO5Py4tHmhUgaywp5w==:117 Cc: Konstantin Belousov , svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, jhb@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 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: Fri, 14 Dec 2012 04:18:10 -0000 On Thu, 13 Dec 2012, Pawel Jakub Dawidek wrote: > On Thu, Dec 13, 2012 at 08:16:21PM +0200, Konstantin Belousov wrote: >> On Thu, Dec 13, 2012 at 05:55:41PM +0100, Pawel Jakub Dawidek wrote: >>> On Thu, Dec 13, 2012 at 06:12:42PM +0200, Konstantin Belousov wrote: >>>> On Thu, Dec 13, 2012 at 12:12:44PM +0100, Pawel Jakub Dawidek wrote: >>>>> On Wed, Dec 12, 2012 at 11:06:52PM +0200, Konstantin Belousov wrote: >>>>> I saw CTLFLAG_TUN on the sysctl and assumed it is read-only... >>>>> How about defining BSD_PID_MAX in sys/proc.h, which would be visible by >>>>> userland as well and setting PID_MAX to BSD_PID_MAX? >>>>> >>>>> This would also help bsnmpd. >>>>> >>>>> http://people.freebsd.org/~pjd/patches/PID_MAX.patch >>>> Do you know why PID_MAX is under _KERNEL ? If there is no real reason, >>>> it would be better to move it outside kernel-only section. sys/proc.h >>>> is not in POSIX anyway. I don't really know, but POSIX says that {PID_MAX} is intentionally left out of POSIX because pids_t might be cookies in a very large address space so that there is no useful use of {PID_MAX}. (POSIX doesn't say exactly this. It says "arrays of values of this type [uid_t, gid_t or pid_t] are unlikely to be fully portable".) >>> I assumed it will break some ports that may define it themselves. >>> I wonder if we could do a test ports build to see what's the impact. >> >> Sure. >> >> On the other hand, sys/proc.h is mostly useless for the application code >> as it is now. Might be, use >> #ifndef PID_MAX >> braces ? Ugh. If there is any useful use of {PID_MAX}, then this just breaks detection of using the wrong value. > This can be done of course, but it won't help cases where PID_MAX is > defined after sys/proc.h is included. Bruce