Improve robustness and detail of subprocess segfault check