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

void fun(int signo,struct siginfo *info,void *context)
{
   printf("test for sigaction.\n");
   printf("%10s\n",context);
}

main()
{
   struct sigaction action, oldaction;
   sigemptyset(&action.sa_mask);
   action.sa_flags=SA_SIGINFO;
   action.sa_sigaction=fun;
   sigaction(SIGINT,&action,&oldaction);
   printf("waiting for SIGINT...\n");
   while(1)
   {
	pause();
   }
}
