samedi 23 janvier 2016

Suppress signal output like "Abort trap: 6" in a shellscript, for a test that should crash

Something helpfully outputs Abort trap: 6 when a program crashes, that is started from a bash:

$ ./crash-if-correct > /dev/null 2>&1 Abort trap: 6

For a test case that should be crashing, this creates output that looks wrong. How can this be suppressed ?

I suspect it's not the shell (in my case that's bash), because an ack 'trap:' through the bash sources revealed nothing.

Aucun commentaire:

Enregistrer un commentaire