什么是文件描述符的“异常”?

调用select()询问哪些文件描述符有“异常”等待时,这是什么意思?

如何触发这些“异常”之一?

如果有人可以指出一个很好的解释,那将是非常棒的.我一直在搜索,找不到东西.

解决方法

简单形式:当TCP套接字接收带外数据时会出现异常情况.

如果您阅读了选择manual page,可以参考另一个名为select_tut的补充手册页,其中说明如下:

exceptfds

This set is watched for “exceptional conditions”. In practice,only one such exceptional condition is common: the availability of out-of-band (OOB) data for reading from a TCP socket. See recv(2),send(2),and tcp(7) for more details about OOB data. (One other less common case where select(2) indicates an exceptional condition occurs with pseudo-terminals in packet mode; see tty_ioctl(4).) After select() has returned,exceptfds will be cleared of all file descriptors except for those for which an exceptional condition has occurred.

相关文章

对象的传值与返回说起函数,就不免要谈谈函数的参数和返回值...
从实现装饰者模式中思考C++指针和引用的选择最近在看...
关于vtordisp知多少?我相信不少人看到这篇文章,多半是来自...
那些陌生的C++关键字学过程序语言的人相信对关键字并...
命令行下的树形打印最近在处理代码分析问题时,需要将代码的...
虚函数与虚继承寻踪封装、继承、多态是面向对象语言的三大特...