Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Sep 2000 13:51:32 -0400
From:      Randall Hopper <aa8vb@nc.rr.com>
To:        stable@freebsd.org
Subject:   Question on catching SIGFPE
Message-ID:  <20000902135131.A18991@nc.rr.com>

next in thread | raw e-mail | index | archive | help
I'm teaching Python to catch SIGFPE, and currently I have this:

   #elif defined(__FreeBSD__)
   #include <ieeefp.h>
       fpresetsticky( FP_X_INV | FP_X_DZ | FP_X_OFL );
       fpsetmask( FP_X_INV | FP_X_DZ | FP_X_OFL );
       signal(SIGFPE, handler);

which executes on initialization and every time one of these 3 FP exceptions
is caught in "handler".

It works fine for the first FP exception (handler is called and the above
code reexecutes).  But for subsequent exceptions, handler is "not" called.

Apparently I'm not doing something I should be.  What is it?

-- 
Randall Hopper
aa8vb@nc.rr.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000902135131.A18991>