From owner-freebsd-hackers Sat Feb 22 11:26:59 2003 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3848D37B401 for ; Sat, 22 Feb 2003 11:26:58 -0800 (PST) Received: from wall.polstra.com (wall-gw.polstra.com [206.213.73.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2E5AD43F85 for ; Sat, 22 Feb 2003 11:26:57 -0800 (PST) (envelope-from jdp@polstra.com) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.12.3/8.12.3) with ESMTP id h1MJQtu5030980 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sat, 22 Feb 2003 11:26:55 -0800 (PST) (envelope-from jdp@vashon.polstra.com) Received: (from jdp@localhost) by vashon.polstra.com (8.12.6/8.12.6/Submit) id h1MJQsgw022805; Sat, 22 Feb 2003 11:26:54 -0800 (PST) (envelope-from jdp) Date: Sat, 22 Feb 2003 11:26:54 -0800 (PST) Message-Id: <200302221926.h1MJQsgw022805@vashon.polstra.com> To: hackers@freebsd.org From: John Polstra Cc: tlambert2@mindspring.com Subject: Re: Raising SIGSEGV in SIGSEGV handler makes FreeBSD loop In-Reply-To: <3E5437CB.DC14EC42@mindspring.com> References: <20030219134131.T70370-100000@logout.sh.cvut.cz> <3E5437CB.DC14EC42@mindspring.com> Organization: Polstra & Co., Seattle, WA Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In article <3E5437CB.DC14EC42@mindspring.com>, Terry Lambert wrote: > Vaclav Haisman wrote: > > Besides, this doesn't explain anything. I see I haven't asked any question in > > my previous post. So, why does FreeBSD behave different? > > Because POSIX mandates that it do so? > > man 3 signal tells us: > > The handled signal is unblocked when the function returns and the process > continues from where it left off when the signal occurred. Unlike previ- > ous signal facilities, the handler func() remains installed after a sig- > nal has been delivered. POSIX mandates no such thing. You missed the part of the POSIX spec that says: The behavior of a process is undefined after it returns normally from a signal-catching function for a SIGFPE, SIGILL, SIGSEGV, or SIGBUS signal that was not generated by the kill() function, the sigqueue() function, or the raise() function as defined by the C Standard. It's in ANSI/IEEE Std 1003.1 section 3.3.1.3. POSIX permits the FreeBSD behavior but does not mandate it. John -- John Polstra John D. Polstra & Co., Inc. Seattle, Washington USA "Disappointment is a good sign of basic intelligence." -- Chögyam Trungpa To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message