c 언어
리눅스 시그널 2
sokoban
2007. 9. 17. 09:46
#include <stdio.h>
#include <signal.h>
#include <unistd.h>
main()
{
/* SIGINT 시그널 받으면 무시하도록 설정 */
signal(SIGINT, SIG_IGN);
while (1) {
printf("Hello World\n");
sleep(1); /* 1초 동안 정지 */
}
}
콘트롤 -Z 해서 스탑하고 나간당. 그리고 킬-9를 입력 킬한다.