Re: signal(SIGFPE,SIG_IGN) causes endless loop

Bryn Paul Arnold Jones (bpaj@gytha.demon.co.uk)
Sat, 20 Apr 1996 02:24:41 +0100 (BST)


On 19 Apr 1996, Thomas Koenig wrote:

> The following program loops endlessly, with repeated SIGFPE's, as
> repeated by strace.
>
> This is an old, old bug, but maybe fixable before 2.0?
>
> #include <stdio.h>
> #include <signal.h>
>
> int main()
> {
> int a,b,c;
>
> signal(SIGFPE,SIG_IGN);
> a = 1;
> b = 0;
> c = a/b;
> return 0;
> }
>
Hmm, gdb sais it's restarting on line 11 (c=a/b), after the signal.
Perhaps it should ignore the signal, and carry on on the next line ....
(you know what I mean).
Bryn

--
PGP key pass phrase forgotten,   \ Overload -- core meltdown sequence 
again :(                          |            initiated.
                                 / This space is intentionally left   
                                |  blank, apart from this text ;-)
                                 \____________________________________