From owner-svn-src-head@FreeBSD.ORG Tue Aug 24 07:22:24 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 9E6661065672; Tue, 24 Aug 2010 07:22:24 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8DCBC8FC1B; Tue, 24 Aug 2010 07:22:24 +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 o7O7MObH066649; Tue, 24 Aug 2010 07:22:24 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7O7MOH0066646; Tue, 24 Aug 2010 07:22:24 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201008240722.o7O7MOH0066646@svn.freebsd.org> From: David Xu Date: Tue, 24 Aug 2010 07:22:24 +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: r211732 - in head/sys: kern sys 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: Tue, 24 Aug 2010 07:22:24 -0000 Author: davidxu Date: Tue Aug 24 07:22:24 2010 New Revision: 211732 URL: http://svn.freebsd.org/changeset/base/211732 Log: - According to specification, SI_USER code should only be generated by standard kill(). On other systems, SI_LWP is generated by lwp_kill(). This will allow conforming applications to differentiate between signals generated by standard events and those generated by other implementation events in a manner compatible with existing practice. - Bump __FreeBSD_version Modified: head/sys/kern/kern_thr.c head/sys/sys/signal.h Modified: head/sys/kern/kern_thr.c ============================================================================== --- head/sys/kern/kern_thr.c Tue Aug 24 06:30:46 2010 (r211731) +++ head/sys/kern/kern_thr.c Tue Aug 24 07:22:24 2010 (r211732) @@ -312,7 +312,7 @@ thr_kill(struct thread *td, struct thr_k error = 0; ksiginfo_init(&ksi); ksi.ksi_signo = uap->sig; - ksi.ksi_code = SI_USER; + ksi.ksi_code = SI_LWP; ksi.ksi_pid = p->p_pid; ksi.ksi_uid = td->td_ucred->cr_ruid; PROC_LOCK(p); @@ -371,7 +371,7 @@ thr_kill2(struct thread *td, struct thr_ if (error == 0) { ksiginfo_init(&ksi); ksi.ksi_signo = uap->sig; - ksi.ksi_code = SI_USER; + ksi.ksi_code = SI_LWP; ksi.ksi_pid = td->td_proc->p_pid; ksi.ksi_uid = td->td_ucred->cr_ruid; if (uap->id == -1) { Modified: head/sys/sys/signal.h ============================================================================== --- head/sys/sys/signal.h Tue Aug 24 06:30:46 2010 (r211731) +++ head/sys/sys/signal.h Tue Aug 24 07:22:24 2010 (r211732) @@ -338,6 +338,7 @@ struct sigaction { #define SI_MESGQ 0x10005 /* Signal generated by arrival of a */ /* message on an empty message queue. */ #define SI_KERNEL 0x10006 +#define SI_LWP 0x10007 /* Signal sent by thr_kill */ #endif #if __BSD_VISIBLE #define SI_UNDEFINED 0