user2763554 user2763554 - 4 days ago 6
Python Question

Python subprocess.Popen - How to capture childs backtrace upon abort

I want to run a process in a loop and if the process returns 0, I must rerun it. If it aborts, I have to capture its stack trace (backtrace). I'm using

subprocess.Popen()
and
.communicate()
to run the process. Now
.returncode
is 134, i.e. child has received SIGABRT, is there any way I can capture the backtrace (stack trace) of child?
Since this is a testing tool, I have to capture all the necessary information before I forward it to dev team.

Answer

Thanks to this site and last comment of @Marco, I can fetch the backtrace from core

Comments