- 论坛徽章:
- 0
|
请教resource temporarily unavailable错误
原帖由 "xcwbest" 发表:
我在read( socketfd, p, num )的时候发生resource temporarily unavailable错误,以前没有见,有哪位大侠给解释一把?谢谢。
我的系统Turbo Linux ES8
服务器CPU2.4G*2/内存4G/
应该是你收到了EAGAIN的错误,一般的情况下,如果你使用的是non-block的方式,可能会得到这个错误的提示,一般的处理方式就是忽略它,继续进行循环处理(continue)。
看man 2 recv的提示:
EAGAIN The socket is marked non-blocking and the receive operation
would block, or a receive timeout had been set and the timeout
expired before data was received.
还可以参考:
http://www.developerweb.net/sock-faq/detail.php?id=533 |
|