"Epoll errno 4" -- epoll encounters eintr (interrupted system call)

Source: Internet
Author: User

Epoll is used to write a small number of sub-processes that communicate with each other through FIFO.ProgramDuring the debugging process, it is found that each time the sub-process is killed, epoll will report an error in interrupted system call with the error code eintr (4 ). This means that epoll_wait is interrupted by more advanced system calls. When someone finds this error on the Internet and says it can be ignored, the epoll_wait will be performed again when epoll reports the error number 4.

 

While (1) <br/>{< br/> ...... <br/> NFDs = epoll_wait (kdpfd, events, curfds,-1); <br/> If (NFDs =-1) <br/>{< br/> If (errno = eintr) <br/>{< br/> continue; <br/>}< br/> else <br/> {<br/> wislog-> error ("epoll_wait error, % s", strerror (errno )); <br/> break; <br/>}< br/> ...... <br/>}< br/>

Reference http://bbs3.chinaunix.net/thread-1585865-1-3.html

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.