#include<stdio.h>
#include<stdlib.h>
#include<signal.h>
#include<sys/types.h>
//信号函数1 crtl+c
void test1(int sign)
{
printf("SIGINT IS SEND\n");
//return 0;
}
int main(int argc,char*argv[])
{
printf("register signal\n");
signal(SIGINT,test1);//注册信号函数
printf("register success\n");
while(1);
return 0;
}