Re: [ROOT] SIGFPE

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Tue Jan 09 2001 - 18:05:16 MET


Hi Mike,

   just install your own signal handler for SIGFPE. Do the following:

   #include <signal.h>
   void mysigfpehandler(int i) { /* handle SIGFPE */ }

   ...
   struct sigaction sigact;
   sigact.sa_handler = mysigfpehandler;
   sigemptyset(&sigact.sa_mask);
   sigact.sa_flags = 0;
   if (sigaction(SIGFPE, &sigact, 0) < 0)
      printf("error installing signal handler for SIGFPE\n");
   ...



Mike Heffner wrote:
> 
> Hi,
> 
>     I am having trouble with root's signal handler.  It appears that the
> default action for SIGFPE is to print a message and abort processing.
> How can I change this so it doesn't abort processing?
> 
> Thanks,
> Mike

-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch              Phone: +41 22 7679248
WWW:    http://root.cern.ch/~rdm/            Fax:   +41 22 7677910



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:33 MET