c언어 tcp/ip프로그래밍 select fail Interrupted system call 문제는 어떻게 해결해야될까요 ?

emfldlem의 이미지

tcp/ip 프로그래밍으로 채팅프로그램에서 간단한 시그널 기능을 추가하려고합니다.

채팅 프로그램은 서버 클라이언트 아무 이상없지 잘 작동되다가

서버에 시그널을 추가하고 그 시그널을 주면

select fail : Interrupted system call

이런 에러를 출력하면서 서버가 종료 되버립니다.

Interrupted system call 이 어떤경우에 출력 되는 에러인가요 ?

아래는 채팅 서버 프로그램에 추가한 시그널 부분입니다.

struct sigaction act;
act.sa_flags =SA_RESTART;
sigemptyset(&act.sa_mask);
sigaddset(&act.sa_mask, SIGUSR1);

act.sa_handler = inforsend;
sigaction(SIGUSR1, &act, NULL);

void inforsend(int signo)
{
int i=0;
for(i=0; i {
send(clisock_list[i], &cliinfo_list[i][0], sizeof(cliinfo_list[i]),0);

}

}

USR1 시그널을 받으면 서버는 접속된 클라이언트에게 정보를 주는 형식으로 제작을 하였습니다.