lkml.org 
[lkml]   [1996]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: signal(SIGFPE,SIG_IGN) causes endless loop (fwd)
Date
Forwarded message:
>

> > > 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).

That is probably the correct thing to do. Does it seem strange to anyone
that an integer divison problem causes a floating point exception?

Oh, I just tested HP-UX 9.03. It seems to do the same thing as Linux.
At least as far as I can tell. I don't know how to use the debugger on
HP-UX, so all I can say is that the program never finishes, and can not
be interupted by a cntrl-C. It can be suspended with a cntrl-Z.

Jim


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.158 / U:0.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site