GDB 作为子进程运行在收到“kill -9”后停止父进程。
我通过运行一个运行 GDB 批处理实例的脚本来在 python 中运行自动化测试。如果输出满足某些条件,我会终止 gdb 的 pid,以便可以启动 GDB 的新实例。我运行 GDB 只是为了在发生段错误时记录回溯。我的问题是,在脚本中终止 GDB 实例或在终端上终止会导致我的脚本“停止”。
有没有办法向 GDB 子进程发送终止信号而不停止我的父进程?
I am running automated tests in python by running a script that runs a batched instance of GDB. If the output meets certain conditions I kill the pid of gdb so I can launch a new instance of GDB. I am running GDB only to log backtraces in case of segfaults. My issue is that killing the GDB instance in the script or by kill on a terminal results in my script being "Stopped".
Is there a way to send a kill signal to a GDB subprocess without it Stopping my parent process?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
。替代方案:
glibc
的catchsegv
/libSegFault.so
。segv_handler
SIGSEGV
,SIGABRT
等),它启动gstack
或gdb
,附加到自身并转储相关跟踪。Alternatives:
glibc
'scatchsegv
/libSegFault.so
.segv_handler
SIGSEGV
,SIGABRT
, etc.) which launchesgstack
orgdb
, attaches to itself and dumps the relevant trace.