#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/types.h>
#include <signal.h>

void bye(void)
{
  printf("\nI am exiting....\n");  
}

void sig12_handler(void)
{
	exit(0);
}

int main(void)
{     
    signal (12,  (sighandler_t) sig12_handler);
       
    atexit(bye);
    //kill(getpid(), 12);
    
    while (1);
     
  return(0); 
}

