Catching core dumps in a shell script
brettw at cray.com.au
Mon Feb 4 13:27:49 EST 2002
On Mon, 4 Feb 2002, Michael Still wrote:
> Is there a generic way of catching a core dump in a program which is run
> in a shell script? Some sort of signal handler perhaps?
I dont know about generic...
Does an exit status > 128 indicate a core dump has occured?:
[jade] cat x.c
[jade] grep SIGSEGV /usr/include/asm/signal.h
#define SIGSEGV 11
[jade] cc -o x x.c
Memory fault (core dumped)
[jade] echo $?
[jade] echo 139 - 11 | bc
More information about the linux