When a process dumps core, does it set any particular exit code? Alternatively, is there a way to detect if core was dumped in a shell script.
I have shell script that fires a job which occasionally dumps the core. If my job dumps the core, I would like to modify the shell script so that next lines can check status and inform others interested that the job dumped core.
We save core dumps and do analyse it. This right now is done by simple find command. If I can check if one of the lines in my shell script caused core dump, I can diagnose the problems much faster.
On ubuntu 12.04.