问题
Which binary or piece of code is printing Segmentation fault on the console when an error occurs?
回答1:
That's the invoking shell's job, when job control is enabled. Demonstration with bash:
$ set +m # disable job control
$ bash -c 'kill -SEGV $$'
$ set -m # enable job control
$ bash -c 'kill -SEGV $$'
Segmentation fault (core dumped)
来源:https://stackoverflow.com/questions/32564735/what-actually-prints-segmentation-fault