linux - 处理SIGCHLD信号时子进程自动重启
PHP中文网
PHP中文网 2017-04-17 15:02:05
0
1
294
PHP中文网
PHP中文网

认证高级PHP讲师

reply all(1)
巴扎黑

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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!