From owner-svn-src-head@FreeBSD.ORG Sat Feb 27 22:08:56 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2CE01065679; Sat, 27 Feb 2010 22:08:55 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id B55688FC13; Sat, 27 Feb 2010 22:08:55 +0000 (UTC) Received: from turtle.stack.nl (turtle.stack.nl [IPv6:2001:610:1108:5010::132]) by mx1.stack.nl (Postfix) with ESMTP id 1AAA9359962; Sat, 27 Feb 2010 23:08:55 +0100 (CET) Received: by turtle.stack.nl (Postfix, from userid 1677) id 05B9017B2B; Sat, 27 Feb 2010 23:08:55 +0100 (CET) Date: Sat, 27 Feb 2010 23:08:54 +0100 From: Jilles Tjoelker To: Konstantin Belousov Message-ID: <20100227220854.GB77656@stack.nl> References: <201002271532.o1RFWnCp099462@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201002271532.o1RFWnCp099462@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r204413 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Feb 2010 22:08:56 -0000 On Sat, Feb 27, 2010 at 03:32:49PM +0000, Konstantin Belousov wrote: > Author: kib > Date: Sat Feb 27 15:32:49 2010 > New Revision: 204413 > URL: http://svn.freebsd.org/changeset/base/204413 > Log: > For kinfo_proc in kp->ki_siglist, return the set of the signals pending > in the process queue when gathering information for the process, and set > of signals pending for the thread, when gathering information for the > thread. Previously, the sysctl returned a union of the process and some > arbitrary thread pending set for the process, and union of the process > and the thread pending set for the thread. Although the new way provides maximum information and the old way was definitely broken for processes, I think the new way may not be what I expect. In particular, 'ps O pending' and 'ps HO pending' now give (usually) disjunct answers, even for single-threaded processes. I suppose these different answers can be useful for kernel debugging, but it should be documented. Most interesting stuff will be in the process queue so the change will not be very noticeable. Signals directed at threads are usually traps (which do not stay pending very long), pthread_kill() or SIGEV_THREAD_ID. SIGPIPE and SIGSYS (not from kill/sigqueue) may be expected to be thread-directed but they are process-directed. In 7.x, process-directed signals are often delivered directly to a thread queue, but this usually only happens for signals that will be delivered right away. Somewhat related, ki_sigmask could be the logical AND of all threads' td_sigmask when gathering information for the process, instead of the td_sigmask of the most recently created thread; fill_kinfo_aggregate() could handle this. -- Jilles Tjoelker