[英]GDB run as subprocess stops parent process after receiving a 'kill -9'
I am running automated tests in python by running a script that runs a batched instance of GDB. 我正在通过运行运行批处理GDB实例的脚本在python中运行自动化测试。 If the output meets certain conditions I kill the pid of gdb so I can launch a new instance of GDB.
如果输出满足某些条件,我将杀死gdb的pid,以便启动新的GDB实例。 I am running GDB only to log backtraces in case of segfaults.
我运行GDB仅在出现段错误的情况下记录回溯。 My issue is that killing the GDB instance in the script or by kill on a terminal results in my script being "Stopped".
我的问题是,在脚本中杀死GDB实例或在终端上杀死会导致我的脚本“停止”。
Is there a way to send a kill signal to a GDB subprocess without it Stopping my parent process? 有没有一种方法可以在不停止我的父进程的情况下向GDB子进程发送终止信号?
I am running GDB only to log backtraces in case of segfaults
我运行GDB仅在出现段错误时记录回溯
Alternatives: 备择方案:
glibc
's catchsegv
/ libSegFault.so
. glibc
的catchsegv
/ libSegFault.so
。 segv_handler
SIGSEGV
, SIGABRT
, etc.) which launches gstack
or gdb
, attaches to itself and dumps the relevant trace. SIGSEGV
, SIGABRT
等)安装一个处理程序,该处理程序将启动gstack
或gdb
,并将其附加到自身并转储相关的跟踪。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.