From owner-freebsd-hackers  Tue May  2 10: 8:35 2000
Delivered-To: freebsd-hackers@freebsd.org
Received: from mercury.Sun.COM (mercury.Sun.COM [192.9.25.1])
	by hub.freebsd.org (Postfix) with ESMTP id ADE4637B550
	for <freebsd-hackers@FreeBSD.ORG>; Tue,  2 May 2000 10:08:26 -0700 (PDT)
	(envelope-from Dimitri.Tombroff@sun.com)
Received: from sunfra.France.Sun.COM ([129.157.188.1])
	by mercury.Sun.COM (8.9.3+Sun/8.9.3) with ESMTP id KAA28326
	for <freebsd-hackers@FreeBSD.ORG>; Tue, 2 May 2000 10:08:23 -0700 (PDT)
Received: from sunchorus.France.Sun.COM (sunchorus [129.157.173.1])
	by sunfra.France.Sun.COM (8.8.8+Sun/8.8.8/ENSMAIL,v1.7) with ESMTP id TAA03839
	for <freebsd-hackers@FreeBSD.ORG>; Tue, 2 May 2000 19:08:21 +0200 (MET DST)
Received: from tumba.France.Sun.COM (tumba [129.157.173.42])
	by sunchorus.France.Sun.COM (8.8.8+Sun/8.8.8) with ESMTP id TAA21543
	for <freebsd-hackers@FreeBSD.ORG>; Tue, 2 May 2000 19:08:20 +0200 (MET DST)
Received: from sun.com (localhost [127.0.0.1])
	by tumba.France.Sun.COM (8.9.3+Sun/8.9.1) with ESMTP id TAA05760
	for <freebsd-hackers@FreeBSD.ORG>; Tue, 2 May 2000 19:08:06 +0200 (MET DST)
Message-ID: <390F0B76.4D4A9D62@sun.com>
Date: Tue, 02 May 2000 19:08:06 +0200
From: Dimitri Tombroff <Dimitri.Tombroff@sun.com>
Organization: Sun Microsystems
X-Mailer: Mozilla 4.51 [en] (X11; U; SunOS 5.7 sun4u)
X-Accept-Language: en
MIME-Version: 1.0
To: freebsd-hackers@FreeBSD.ORG
Subject: bug (?) in trapsignal 
References: <200005012111.OAA94013@bubba.whistle.com> <200005021531.LAA73669@khavrinen.lcs.mit.edu>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-freebsd-hackers@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.ORG

Hi all,
I was having a look at the last  kern_sig.c and the following seems wrong :

/*
 * Send a signal caused by a trap to the current process.
 * If it will be caught immediately, deliver it with correct code.
 * Otherwise, post it normally.
 */
void
trapsignal(p, sig, code)
 struct proc *p;
 register int sig;
 u_long code;
{
 register struct sigacts *ps = p->p_sigacts;

 if ((p->p_flag & P_TRACED) == 0 && SIGISMEMBER(p->p_sigcatch, sig) &&
     SIGISMEMBER(p->p_sigmask, sig)) {
                         ~~~~~~~~~~~~~~~~~~~~~~
  p->p_stats->p_ru.ru_nsignals++;
    .....



Seems to me one needs a :

    SIGISMEMBER(p->p_sigmask, sig) == 0



Dimitri



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message