From owner-freebsd-bugs@FreeBSD.ORG Tue Aug 31 07:20:12 2010 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B6F01065696 for ; Tue, 31 Aug 2010 07:20:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 316A88FC1D for ; Tue, 31 Aug 2010 07:20:12 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o7V7KCAp023434 for ; Tue, 31 Aug 2010 07:20:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o7V7KCAl023429; Tue, 31 Aug 2010 07:20:12 GMT (envelope-from gnats) Date: Tue, 31 Aug 2010 07:20:12 GMT Message-Id: <201008310720.o7V7KCAl023429@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: kern/150138: commit references a PR X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2010 07:20:12 -0000 The following reply was made to PR kern/150138; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/150138: commit references a PR Date: Tue, 31 Aug 2010 07:16:01 +0000 (UTC) Author: davidxu Date: Tue Aug 31 07:15:50 2010 New Revision: 212047 URL: http://svn.freebsd.org/changeset/base/212047 Log: If a process is being debugged, skips job control caused by SIGSTOP/SIGCONT signals, because it is managed by debugger, however a normal signal sent to a interruptibly sleeping thread wakes up the thread so it will handle the signal when the process leaves the stopped state. PR: 150138 MFC after: 1 week Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Tue Aug 31 06:22:03 2010 (r212046) +++ head/sys/kern/kern_sig.c Tue Aug 31 07:15:50 2010 (r212047) @@ -2139,20 +2139,9 @@ tdsendsignal(struct proc *p, struct thre * We try do the per-process part here. */ if (P_SHOULDSTOP(p)) { - /* - * The process is in stopped mode. All the threads should be - * either winding down or already on the suspended queue. - */ - if (p->p_flag & P_TRACED) { - /* - * The traced process is already stopped, - * so no further action is necessary. - * No signal can restart us. - */ - goto out; - } - if (sig == SIGKILL) { + if (p->p_flag & P_TRACED) + goto out; /* * SIGKILL sets process running. * It will die elsewhere. @@ -2163,6 +2152,8 @@ tdsendsignal(struct proc *p, struct thre } if (prop & SA_CONT) { + if (p->p_flag & P_TRACED) + goto out; /* * If SIGCONT is default (or ignored), we continue the * process but don't leave the signal in sigqueue as @@ -2207,6 +2198,8 @@ tdsendsignal(struct proc *p, struct thre } if (prop & SA_STOP) { + if (p->p_flag & P_TRACED) + goto out; /* * Already stopped, don't need to stop again * (If we did the shell could get confused). _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"