Signal Handler for arithmetical error (overflow, underflow, div by zero)

Please support our C advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Mar 2007
Posts: 13
Reputation: roby4eldiablo is an unknown quantity at this point 
Solved Threads: 0
roby4eldiablo roby4eldiablo is offline Offline
Newbie Poster

Signal Handler for arithmetical error (overflow, underflow, div by zero)

 
0
  #1
Mar 22nd, 2007
Hi all, someone can tell me where i can find an example of this kind of signal handler?
i try to use fenv.h but on cygwin doesn't work (cygwin don't have it) and this program must run on cygwin and on solaris.
i try also with SIGFPE, but when i test a div by zero, he only report this:

[main] memory2 3456 _cygtls::handle_exceptions: Error while dumping state (probably corrupted stack)
Segmentation fault (core dumped)
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 539
Reputation: thekashyap will become famous soon enough thekashyap will become famous soon enough 
Solved Threads: 50
thekashyap's Avatar
thekashyap thekashyap is offline Offline
Posting Pro

Re: Signal Handler for arithmetical error (overflow, underflow, div by zero)

 
0
  #2
Mar 22nd, 2007
Does cygwin have any kinda support for signal handling? If yes d'u know which is the file that defines teh signals... ?
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 13
Reputation: roby4eldiablo is an unknown quantity at this point 
Solved Threads: 0
roby4eldiablo roby4eldiablo is offline Offline
Newbie Poster

Re: Signal Handler for arithmetical error (overflow, underflow, div by zero)

 
0
  #3
Mar 22nd, 2007
with signal.h i can catch SIGFPE, but how can i make the handler?
I have the problem of catch Overflow, underflow and div by zero, and for all i must do different operation.
If u give me a skeleton of the handler i can make it. i don't know where begin with it.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 1811 | Replies: 2
Thread Tools Search this Thread



Tag cloud for C
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC