Generating coredump's from within a signal handler.
keramida at ceid.upatras.gr
Wed Jun 22 16:16:41 GMT 2005
On 2005-06-22 16:00, mats.lindberg at se.transport.bombardier.com wrote:
> I'm writing a program that when receiving a SIGTERM
> shall generate a coredump of itself and exit.
> This coredump shall be analysed later on using gdb.
> I've tried to raise(SIGABRT) when handling SIGTERM,
> this generates a coredump, but the stack seems messed
> up when examining it with gdb.
The stack *is* ``messed up'' when a program runs within a signal handler
(where ``messed up'' means signal handlers are not called as normal C
functions, but are entered on exit from a system call using special
What do you see in the gdb backtrace that seems ``messed up''?
More information about the freebsd-questions