【发布时间】:2016-08-31 20:20:42
【问题描述】:
我有一个二进制 foo,我会给 foo 一个文件输入,这可能会触发 Ubuntu 中的 coredump。我为此编写了一个循环,并在每次迭代中更改文件内容。但我想在出现 coredump 时终止循环。这是 bash 代码:
while true
do
change_file file_s > file_new
./foo file_new
# need to check coredump to terminate the loop
done
如果在 python 中更容易,我可以将脚本更改为 python。
【问题讨论】:
-
foo是否会因为非核心转储原因返回非零值?
标签: python bash ubuntu coredump