sigfpe

Can I ignore a SIGFPE resulting from division by zero?

I have a program which deliberately performs a divide by zero (and stores the result in a volatile variable) in order to halt in certain circumstances. However, I'd like to be able to disable this halting, without changing the macro that performs the division by zero. Is there any way to ignore it? I've tried using #include <signal.h>...

On linux, what can cause dlopen to emit SIGFPE?

I have a library of dubious origins which is identified by file as a 32 bit executable. However, when I try to dlopen it on a 32 bit CentOS 4.4 machine, dlopen terminates with SIGFPE. Surely if there was something wrong with the format of the binary then dlopen should be handling an error? So the question is: What kinds of problems ca...

C++/CLI: SIGFPE, _control87, _fpreset, porting ancient unmanaged Watcom C app to .NET

I have a several-thousand-line application that relies on SIGFPE (handled by a function pointer passed to signal()) to change state and have the code run correctly when certain floating point conditions happen. However, under C++/CLI in managed-mode, _control87 generates a System.ArithmeticException executing in a static lib written in ...