I am looking through code for FreeBSD. The code uses kevent
programming interface. Now, I find the lines like below:
status = kevent(...)
if(status < 0){
if(EINTR == errno){
goto l_kevent;
}
/* ... */
}
I need to port the code for Linux, and I wonder... Should I check for EINTR
with Linux epoll
calls. I know that epoll
has epoll_pwait
, and it is still should be checked for EINTR
. But the documentation I have on hand tells me nothing about the epoll_ctl
calls being interruptible.
I can look into source code for epoll. But, as humble, as I am, I do not know how signals are handled in kernel. So, if the code itself relies on some interrupt mechanics, I do not know where to look for return codes of interest.
Hope I explained problem. The question, once again: my documentation tell me nothing on epoll_ctl
being interruptible, what should I do? Should I check for EINTR
?
P.S If someone will point me out for the source code for the epoll, that I can comprehend, I will gladly try to do my own research.