Re: signal(SIGFPE,SIG_IGN) causes endless loop (fwd)
Dragan Cvetkovic (cvetkovic@gmd.de)
Mon, 22 Apr 1996 17:31:58 +0200
> From: Jim_Nance@avanticorp.com
> >
> > #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;
> > }
>
> In case anyone cares, this program runs to completion under both Digital Unix
> and SunOS. The result of c after the division is 0 on both platforms.
>
It dumps core on Solaris 2.4 with the message:
Floating exception (core dumped).
Regards, Dragan
--
Dragan Cvetkovic, | To be or not to be
cvetkovic@gmd.de (or) | is true. Or maybe not.
Dragan.Cvetkovic@gmd.de | G. Boole