From owner-svn-src-all@FreeBSD.ORG Sat Feb 27 15:32:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BCF0106564A; Sat, 27 Feb 2010 15:32:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6A0198FC08; Sat, 27 Feb 2010 15:32:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1RFWnVr099464; Sat, 27 Feb 2010 15:32:49 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1RFWnCp099462; Sat, 27 Feb 2010 15:32:49 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201002271532.o1RFWnCp099462@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 27 Feb 2010 15:32:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204413 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 27 Feb 2010 15:32:49 -0000 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. MFC after: 1 week Modified: head/sys/kern/kern_proc.c Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Sat Feb 27 15:26:36 2010 (r204412) +++ head/sys/kern/kern_proc.c Sat Feb 27 15:32:49 2010 (r204413) @@ -828,9 +828,10 @@ fill_kinfo_proc_only(struct proc *p, str } /* - * Fill in information that is thread specific. Must be called with p_slock - * locked. If 'preferthread' is set, overwrite certain process-related - * fields that are maintained for both threads and processes. + * Fill in information that is thread specific. Must be called with + * target process locked. If 'preferthread' is set, overwrite certain + * process-related fields that are maintained for both threads and + * processes. */ static void fill_kinfo_thread(struct thread *td, struct kinfo_proc *kp, int preferthread) @@ -899,7 +900,8 @@ fill_kinfo_thread(struct thread *td, str /* We can't get this anymore but ps etc never used it anyway. */ kp->ki_rqindex = 0; - SIGSETOR(kp->ki_siglist, td->td_siglist); + if (preferthread) + kp->ki_siglist = td->td_siglist; kp->ki_sigmask = td->td_sigmask; thread_unlock(td); }