[vox-tech] help with signals and C

Peter Jay Salzman vox-tech@lists.lugod.org
Thu, 14 Mar 2002 05:13:35 -0800


begin Micah Cowan <micah@cowanbox.com> 
> On Wed, 2002-03-13 at 10:52, Peter Jay Salzman wrote:
> 
> Trying to use a sighandler_t or, especially, __sighandler_t, is
> ill-advised....  (and completely unlikely to change code behavior).
 
i was trying to look at the return value of signal() in order to figure
out why the code wasn't working.  a very un-ill-advised course of
action.  :)

> As to why the code is failing....  as far as ANSI C is concerned, an
> implementation doesn't have to signal at all, regardless of what kind of
> floating point exception occurs.

i don't doubt you.

but having a signal called "floating point exception" and not sending it
for any type of error except an integer divide by zero sounds like an
implementation written by bozo the clown with clarabell smoking hobbit
weed behind the big top.

> I don't know enough about the
> specifics of Linux on Intel to tell you whether some circumstances might
> actually cause the signal to be generated, but I believe someone here
> mentioned trying integer zero-divide (SIGFPE doesn't have to be floating
> point, really).
 
according to: man 2 signal, jeff's link, and mark's last email this is
absolutely correct.   :-)

pete