- 論壇徽章:
- 0
|
請(qǐng)教resource temporarily unavailable錯(cuò)誤
原帖由 "xcwbest" 發(fā)表:
我在read( socketfd, p, num )的時(shí)候發(fā)生resource temporarily unavailable錯(cuò)誤,以前沒(méi)有見(jiàn),有哪位大俠給解釋一把?謝謝。
我的系統(tǒng)Turbo Linux ES8
服務(wù)器CPU2.4G*2/內(nèi)存4G/
應(yīng)該是你收到了EAGAIN的錯(cuò)誤,一般的情況下,如果你使用的是non-block的方式,可能會(huì)得到這個(gè)錯(cuò)誤的提示,一般的處理方式就是忽略它,繼續(xù)進(jìn)行循環(huán)處理(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 |
|