lkml.org 
[lkml]   [1996]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: signal(SIGFPE,SIG_IGN)
H. Peter Anvin:

: No kidding. However, it seems to me that either SIGILL, SIGIOT or
: SIGBUS (in decreasing order of personal preference) would be a better
: signal than SIGFPE; I think it is reasonable that a program should be
: able to expect that receiving a SIGFPE means an FP exception has
: occurred.

Yes, that thought occurred to me too - I seem to recall from the
good old days that integer division by zero generated SIGILL.
But POSIX.1 says
SIGFPE Erroneous arithmetic operation, such as division by zero
or an operation resulting in overflow.
SIGILL Detection of an invalid hardware instruction.

Given this description, maybe SIGFPE is more appropriate.

POSIX.1 also says:
The behaviour of a process is undefined after it ignores
a SIGFPE, SIGILL or SIGSEGV signal that was not generated
by the kill() or raise() functions.


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