巴扎黑2017-04-17 15:04:05
I don’t quite understand. Accept just returns an EINTR error, which is just a normal function return. The parent process will continue to execute fork, but it is meaningless at this time because the value of connfd is definitely illegal (-1). The original book determines the value of connfd and has this code under accept:
if(errno == EINTR)
continue;
else
err_say("accept error");
This will stop it.