From owner-freebsd-hackers Wed Dec 20 6:42:42 2000 From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 20 06:42:39 2000 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from assaris.sics.se (assaris.sics.se [193.10.66.234]) by hub.freebsd.org (Postfix) with ESMTP id B3C2337B404 for ; Wed, 20 Dec 2000 06:42:37 -0800 (PST) Received: (from assar@localhost) by assaris.sics.se (8.9.3/8.9.3) id PAA87977; Wed, 20 Dec 2000 15:42:20 +0100 (CET) (envelope-from assar) Sender: assar@assaris.sics.se To: Aled Morris Cc: Matt Dillon , Jack Rusher , "Jacques A. Vidrine" , Warner Losh , hackers@FreeBSD.ORG Subject: Re: Why not another style thread? (was Re: cvs commit: src/lib/libc/gen .. References: From: Assar Westerlund Date: 20 Dec 2000 15:42:19 +0100 In-Reply-To: Aled Morris's message of "Wed, 20 Dec 2000 11:25:36 +0000 (GMT)" Message-ID: <5ld7enduic.fsf@assaris.sics.se> Lines: 17 User-Agent: Gnus/5.070098 (Pterodactyl Gnus v0.98) Emacs/20.6 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Aled Morris writes: > On Mon, 18 Dec 2000, Matt Dillon wrote: > > > void * > > safe_malloc(int bytes) > > { > > void *ptr; > > > > if ((ptr = malloc(bytes)) == NULL) > > *(int *)0 = 1; /* force seg fault */ > > > Shouldn't you use "kill(0, SIGSEGV)" ? Why not err(3) or abort(3) ? /assar To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message