[vox-tech] help with signals and C

Jeff Newmiller vox-tech@lists.lugod.org
Mon, 11 Mar 2002 18:13:21 -0800 (PST)


On Mon, 11 Mar 2002, Peter Jay Salzman wrote:

> hi all,
> 
> can someone post some example code of how to trap a SIGFPE signal and
> abort execution during the course of a C program on linux?

Is this what you are looking for?

http://www.csl.mtu.edu/cs4411.ck/www/NOTES/signal/install.html

I have never tried to make sensible use of SIGFPE in particular...
http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_21.html
gives some reaons why this is problematic (also in info under libc).
This is one reason why a Numerical Computation workgroup formed shortly
after ratification of C89, but I don't know how the results of their
efforts fared in C99.

---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil@dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...2k
---------------------------------------------------------------------------