From owner-freebsd-hackers Tue Aug 8 7: 9:50 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from gatekeeper.radio-do.de (gatekeeper.Radio-do.de [193.101.164.1]) by hub.freebsd.org (Postfix) with ESMTP id 9DEE937B79C for ; Tue, 8 Aug 2000 07:09:43 -0700 (PDT) (envelope-from fn@gatekeeper.radio-do.de) Received: from trinity.radio-do.de (trinity.Radio-do.de [193.101.164.3]) by gatekeeper.radio-do.de (Postfix) with ESMTP id C6F68174FC; Tue, 8 Aug 2000 16:09:36 +0200 (MET DST) Received: (from fn@localhost) by trinity.radio-do.de (8.9.3/8.9.3) id QAA33246; Tue, 8 Aug 2000 16:09:36 +0200 (CEST) (envelope-from fn@gatekeeper.radio-do.de) Date: Tue, 8 Aug 2000 16:09:36 +0200 From: Frank Nobis To: Nicolas Leonard Cc: hackers@FreeBSD.ORG Subject: Re: How to generate a core dump explicily Message-ID: <20000808160936.A33231@radio-do.de> References: <00f101c00140$2a4b5a50$0f0210ac@masa.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: <00f101c00140$2a4b5a50$0f0210ac@masa.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, On Tue, Aug 08, 2000 at 03:54:26PM +0200, Nicolas Leonard wrote: > Hi, > > I would like to generate a core dump 'explicitly' in > my program. How can that be done ? Send yourself a signal that creates a core dump. For example SIGQUIT would do the job. This asumes that you have not hanged the default behaviour of the signals you are willing to receive in your program. man signal, kill, getpid are your friends. kill(getpid(),SIGQUIT) should be ok. Regards, Frank -- ~/.signature not found: wellknown error 42 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message