RSS Forums RSS
Please support our C advertiser: Programming Forums
Views: 1074 | Replies: 2
Reply
Join Date: Mar 2007
Posts: 13
Reputation: roby4eldiablo is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
roby4eldiablo roby4eldiablo is offline Offline
Newbie Poster

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

  #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)
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Feb 2007
Location: Bangalore, India
Posts: 535
Reputation: thekashyap will become famous soon enough thekashyap will become famous soon enough 
Rep Power: 4
Solved Threads: 50
thekashyap's Avatar
thekashyap thekashyap is offline Offline
Posting Pro

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

  #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  
Join Date: Mar 2007
Posts: 13
Reputation: roby4eldiablo is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
roby4eldiablo roby4eldiablo is offline Offline
Newbie Poster

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

  #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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 4:49 pm.
Newsletter Archive - Sitemap - Privacy Statement - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC