?? p9.6.c
字號:
#include <stdio.h>#include <unistd.h>#include <signal.h>void sigusr1(int sig){ printf("got the SIGUSR1 signal...\n"); exit(0);}int main(void){ if(signal(SIGINT,SIG_IGN)==SIG_ERR){ perror("cannot reset the SIGINT signal handler"); return 1; } if(signal(SIGUSR1,sigusr1)==SIG_ERR){ perror("cannot reset the SIGUSR1 signal handler"); return 1; } pause(); return 0;}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -