On Wed, 20 Dec 2000, Peter Seebach wrote:
>In message <[EMAIL PROTECTED]>, 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 [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message