public inbox for linux-newbie@vger.kernel.org
 help / color / mirror / Atom feed
* Query on SIGFPE handling
@ 2004-11-22  6:26 Jagadeesh Bhaskar P
  2004-11-22  7:00 ` Manish Regmi
  0 siblings, 1 reply; 10+ messages in thread
From: Jagadeesh Bhaskar P @ 2004-11-22  6:26 UTC (permalink / raw)
  To: Linux Newbie

Hi,

I wrote a the small program, to c how signals can be caught by
customized routines.

/*********** start of code ********/

#include <stdio.h>
#include <signal.h>

void fe(void){
	printf("floating pt exception:\n");
}

int main(void){
	signal(SIGFPE, (void *)fe);
	printf("%f\n", (1/0));
	return 0;
}

/********** end of code *************/

It goes on catching the signal infinitely, and if i didnt do the
customization of that signal handling, it comes only once and then
exits.

What is the reason? Isnt it supposed to generate a signal once per
event?

Someone please do reply,

-- 
With regards,

Jagadeesh Bhaskar P
R&D Engineer
HCL Infosystems Ltd
Pondicherry
INDIA

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2004-11-22 11:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-22  6:26 Query on SIGFPE handling Jagadeesh Bhaskar P
2004-11-22  7:00 ` Manish Regmi
2004-11-22  7:15   ` Jagadeesh Bhaskar P
2004-11-22  8:24     ` Jagadeesh Bhaskar P
     [not found]       ` <01ca01c4d071$5b35f080$121aa8c0@ascindia.com>
2004-11-22  9:05         ` Jagadeesh Bhaskar P
2004-11-22  9:19           ` Manish Regmi
2004-11-22  9:26             ` Jagadeesh Bhaskar P
2004-11-22  9:26           ` Manish Regmi
2004-11-22 11:15       ` joy merwin monteiro
     [not found]     ` <652016d3041122001540a047fd@mail.gmail.com>
     [not found]       ` <1101113860.5382.36.camel@myLinux>
2004-11-22  9:09         ` further query signal handling! Manish Regmi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox