Why does poll keep returning although there is no input?

后端 未结 3 1110
南旧
南旧 2020-12-18 07:12

I wrote a small test program to figure out how to talk to poll. I created three files testa,testb,testc and wrote the string hel

3条回答
  •  长情又很酷
    2020-12-18 07:38

    The local file descriptors are always ready to perform I/O (unlike sockets, because they are depend on the kernel internal buffer for I/O)). In your case file descriptors are always ready for reading, even if they are empty actually.

提交回复
热议问题