From owner-freebsd-hackers Thu Dec 21 3:30:13 2000 From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 21 03:30:12 2000 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from kai.qix.co.uk (kai.qix.co.uk [195.149.39.121]) by hub.freebsd.org (Postfix) with ESMTP id 1319637B400 for ; Thu, 21 Dec 2000 03:30:11 -0800 (PST) Received: from localhost (aledm@localhost) by kai.qix.co.uk (8.9.3/8.9.3) with ESMTP id LAA02583; Thu, 21 Dec 2000 11:29:54 GMT (envelope-from aledm@qix.co.uk) Date: Thu, 21 Dec 2000 11:29:54 +0000 (GMT) From: Aled Morris To: Peter Seebach Cc: hackers@FreeBSD.ORG Subject: Re: Why not another style thread? (was Re: cvs commit: src/lib/libc/gen .. In-Reply-To: <200012201528.JAA15116@guild.plethora.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 20 Dec 2000, Peter Seebach wrote: >In message , Aled Morris >writes: >>Shouldn't you use "kill(0, SIGSEGV)" ? > >Gratuitously verbose! > raise(SIGSEGV); > >(To be fair, raise(SIGSEGV) is quite likely to just jump to the segfault >handler without actually setting any signal bits, but who can tell?[*]) From /usr/src/lib/libc/gen/raise.c: int raise(s) int s; { return(kill(getpid(), s)); } which raises an interesting difference between my "kill(0," and the probably more rigourously correct "kill(getpid()," in the context of trying to emulate the effect of "*(int *)0 = 1". Aled -- nic-hdl:AWM1-RIPE To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message