Chapter Contents

Previous

Next
SIGIDIV

SIGIDIV



Integer Division by 0


Default handling
Ignoring the signal
Information returned by siginfo
Notes on defining a handler
The SIGIDIV signal is raised when the second operand of a division operator (/ or %) is 0 and default handling is in effect for SIGFPE . If you have specified a handler for SIGFPE (either SIG_IGN or a function you define), SIGIDIV is not raised.


Default handling

If the SIGIDIV signal is raised and default handling is in effect, the program abnormally terminates with an ABEND code of 0C9.


Ignoring the signal

If your program ignores SIGIDIV , program execution continues but the result of the computation that raised the signal is undefined.


Information returned by siginfo

If you call siginfo after a SIGIDIV signal occurs, siginfo returns a pointer to a structure of type FPE_t . Refer to the description of SIGFPE for a discussion of this structure.


Notes on defining a handler

If you define a handler for SIGIDIV , you can change the result of the computation by using the information returned by siginfo . Refer to the example in the description of the siginfo function for an illustration of this technique.


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.