dus*_*uff 18
并不是的.epoll只对通常会在读/写上表现出阻塞行为的文件描述符有意义,比如管道和套接字.普通文件描述符将始终或多或少地立即返回结果或文件结尾,因此epoll不会对它们执行任何有用的操作.
osg*_*sgx 16
我认为,它将在epoll_ctl上失败并使用 EPERM:
Run Code Online (Sandbox Code Playgroud)EPERM The target file fd does not support epoll.
如果文件没有poll()接口.
实际代码是http://lxr.linux.no/#linux+v3.1/fs/eventpoll.c#L1373
1373 /* The target file descriptor must support poll */
1374 error = -EPERM;
1375 if (!tfile->f_op || !tfile->f_op->poll)
1376 goto error_tgt_fput;
1377
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6490 次 |
| 最近记录: |