#include void myfpeh(int i) { /* i is the signal number. Here it should always be SIGFPE, but theoretically I could install the same signal handler to handle several different signals. */ printf( "Floating point error. Don't do it again.\n" ); } int main() { int i; signal( SIGINT, myfpeh ); printf( "Can't control-c me now!!\n" ); while(1); }