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

void capthendfl(int signum)
{
   printf("SIGINT is captured!\n");
   signal(SIGINT,SIG_DFL);
   printf("SIGINT now is defaulted!\n");
}

main()
{
   int i=10;
   signal(SIGINT,capthendfl);
   printf("waiting for signal...\n");
   while(i>0)
   {
	sleep(1);
	i--;
   }
// while(1)  pause();   
}
