void my_func(int sign_no) { if(sign_no ==SIGINT) printf("i have get SIGINT\n"); else if(sign_no == SIGQUIT) printf("i have get SIGQUIT\n"); } int main() { printf("waiting for signal SIGINT or SIGQUIT\n"); signal(SIGINT,my_func); signal(SIGQUIT,my_func); pause(); exit(0); } 在一终端输入./a.out,执行到pause()时,然后在另一终端输入kill -s SIGINT 进程ID后,终端输出i have get SIGINT。我的困惑时:程序是顺序执行,为什么此时又回到signal(SIGINT,my_func)执行?