lkml.org 
[lkml]   [1996]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: signal(SIGFPE,SIG_IGN) causes endless loop
On 21 Apr 96 at 19:01, Thomas Koenig wrote:

> In linux.dev.kernel, Linus Torvalds <torvalds@cs.helsinki.fi> wrote:
> > - it's stupid. What is the result of a division with 0? For FP errors,
> > there are reasonable things we can do (+-Inf), but for integer
> > division by zero the result is undefined. Allowing the program to just
> > "continue" as if nothing happened without letting it handle signals is
> > the _wrong_ thing to do.
>
>
> There are quite a number of reasonable situations, for example image
> processing, where I might want to ignore an error like that, and don't
> care what the result is (which might show up as a single pixel in error,
> which is no big deal, and also can happen in 69 other ways).
>
> If I write 'ignore this kind of thing', I mean it. I don't think the
> kernel should set policy here.

Maybe it's a probem with the CPU: There should be a status flag to
ignore creating that exception. (I think in VAX assembler you can do
it that way).

>
> I could live with SIGFPE not being ignorable, if I get IEEE behaviour
> for floats. Having the program go into an endless loop is... rude
> at least, and very highly frustrating. Have you ever sent off a program
> which runs for days, and which then goes into an endless loop after
> ten seconds?


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