It's a bit tricky with SIGFPE
.
When SIGFPE
is caught the instruction will be re-executed if you simply return from handler - that's very platform dependant but the man page for signal mentions undefined behavior.
See here: Unix signals doubt - on the execution of the below progem
If you want core file as well, you will need to re-install the default signal handler, see Linux: handling a segmentation fault and getting a core dump, and enable core files (on Unix it is done with ulimit -c ...
)