Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Aug 2000 16:49:56 +0200
From:      Samuel Tardieu <sam@inf.enst.fr>
To:        Nicolas Leonard <nicolas.leonard@animaths.com>
Cc:        hackers@freebsd.org
Subject:   Re: How to generate a core dump explicily
Message-ID:  <2000-08-08-16-49-57%2Btrackit%2Bsam@inf.enst.fr>
In-Reply-To: <011301c00146$c709f170$0f0210ac@masa.com>; from nicolas.leonard@animaths.com on Tue, Aug 08, 2000 at 04:41:46PM %2B0200
References:  <00f101c00140$2a4b5a50$0f0210ac@masa.com> <2000-08-08-15-56-50%2Btrackit%2Bsam@inf.enst.fr> <011301c00146$c709f170$0f0210ac@masa.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On  8/08, Nicolas Leonard wrote:
| Sorry, I wasn't precise enough .
| 
| In fact, I caught the SIGABRT signal (and the others signals which are
| ending the program)
| and I'm doing some ending stuff, and after that, I would like to dump a core
| file.
| 
| I could remove the handler of SIGABRT after my ending suff done, and kill
| myself another
| time, but I would like to know if it's possible to dump the core explicitly.
| (With a dumpcore()
| function or whatever )

You better remove the handler of SIGABRT then call abort(), which will not
only send the SIGABRT again and dump a core but also flush all your buffers
(look at /usr/src/lib/libc/stdlib/abort.c).

But why don't you just use atexit(3) for registering your cleaning stuff,
and let SIGABRT with its default handling?



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2000-08-08-16-49-57%2Btrackit%2Bsam>