Kqueue () and O_NONBLOCK

If you use kqueue (), should you set O_NONBLOCK to your file descriptors? In other words, kqueue () ensures that the next I / O operation in the finished file descriptor will not be blocked, regardless of whether O_NONBLOCK is set?

+2
source share
2 answers

If you use kqueue (), should I set O_NONBLOCK to file descriptors?

Nope.

In other words, kqueue () ensures that the next I / O operation in the finished file descriptor will not be blocked, regardless of whether O_NONBLOCK is set?

Yes.

+3
source

. , . read() return -1 errno EWOULDBLOCK. EWOULDBLOCK , kqueue , () (, , ) .

+2

Source: https://habr.com/ru/post/1693630/


All Articles