From owner-freebsd-standards@FreeBSD.ORG Sat Aug 4 21:49:44 2012 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ECC3C106566C for ; Sat, 4 Aug 2012 21:49:43 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay04.stack.nl [IPv6:2001:610:1108:5010::107]) by mx1.freebsd.org (Postfix) with ESMTP id 85D208FC08 for ; Sat, 4 Aug 2012 21:49:43 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id A2F2A1DD42D; Sat, 4 Aug 2012 23:49:42 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id 8B4162847B; Sat, 4 Aug 2012 23:49:42 +0200 (CEST) Date: Sat, 4 Aug 2012 23:49:42 +0200 From: Jilles Tjoelker To: "Jukka A. Ukkonen" Message-ID: <20120804214942.GB99630@stack.nl> References: <201208040620.q746K8iP036622@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201208040620.q746K8iP036622@freefall.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-standards@FreeBSD.org Subject: Re: standards/170346: Changes to support waitid() and related stuff X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Aug 2012 21:49:44 -0000 On Sat, Aug 04, 2012 at 06:20:08AM +0000, Jukka A. Ukkonen wrote: > From: "Jukka A. Ukkonen" > To: bug-followup@FreeBSD.org, jau@iki.fi > Cc: > Subject: Re: standards/170346: Changes to support waitid() and related stuff > Date: Sat, 04 Aug 2012 09:14:21 +0300 > These links might shed some more light to the optimal > placement of the idtype_t definition. > http://www.unix.com/man-page/OpenSolaris/2/getacct/ > http://www.unix.com/man-page/OpenSolaris/2/sigsend/ > Both of these manual pages apply to Solaris-11. The same > features are apparently also in HP-UX, but they are not > SUS/POSIX - at least not yet. > Esp. the sigsend() style functionality as a generalized > kill() seems to me like a potential candidate to make it > also to SUS/POSIX. Such functionality would be a natural > companion to wait*() with generalized idtype_t and id_t. Although sigsend() may be better than requesting a process list, matching against it and calling kill() for each matching process because it can ensure a snapshot is taken and signaled, I still doubt this has a place in the kernel. OpenSolaris's sigsendset() call particularly looks like someone needed a particular set and then made it pseudo-generic. At some point you will have to defer the filtering to userland because it becomes too complicated and specific, and absent any specific reason it seems best to make that point the POSIX kill() call (with the obvious extension of only killing processes within the same jail). > And in any case it seems likely that id_t and idtype_t > will be used together almost anywhere where one is > needed. Neither of them makes a whole lot sense > without the other. So, keeping them together in the > header files may be beneficial. The id_t type may be useful by itself in applications with some application-specific way of distinguishing the various types of IDs. Note that POSIX.1-2008 only specifies the values P_ALL, P_PGID and P_PID for idtype_t, while an id_t may also contain a UID or a GID. -- Jilles Tjoelker