I am tracing a program using ptrace and that program crashes while running. I have written a code that prints stack trace of a pid. I am stuck at the point that I don't know when it is about to crash and when should I print the stack trace.
Could anyone suggest me what signal a dying program send to its parent? So I can write a signal handler.