Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Sep 2000 11:20:00 -0700 (PDT)
From:      Doug White <dwhite@resnet.uoregon.edu>
To:        Randall Hopper <aa8vb@nc.rr.com>
Cc:        stable@FreeBSD.ORG
Subject:   Re: Question on catching SIGFPE
Message-ID:  <Pine.BSF.4.21.0009051119530.70399-100000@resnet.uoregon.edu>
In-Reply-To: <20000902135131.A18991@nc.rr.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 2 Sep 2000, Randall Hopper wrote:

> 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?

fpresetsticky()

Doug White                    |  FreeBSD: The Power to Serve
dwhite@resnet.uoregon.edu     |  www.FreeBSD.org



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?Pine.BSF.4.21.0009051119530.70399-100000>