#include <stdio.h>
#include <stdio.h>
#include <signal.h>
#include <unistd.h>
static int interval = 1;	/* interval between signal * */

static void alarmhandler(int ignore)
{
	printf("handle signal SIGARM\n");
	fflush(stderr);
	(void)signal(SIGALRM, alarmhandler);
	alarm(interval);	
}

int main()
{
	(void)signal(SIGALRM, alarmhandler);
	alarm(interval);
	
	while (1)
		;
	
	return 0;
}


