setup signal(SIGINT,SIGSEGV) process handler function