Resource temporarily unavailableソケットsend()コマンドでエラーが発生する原因は何ですか? ソケットは のように設定されていAF_UNIX, SOCK_STREAMます。ほとんどの場合は機能しますが、時々このエラーが発生します。ソケットの受信側は正常に動作しているようです。
これはあまり詳細ではないことはわかっていますが、一般的なアイデアを探しているだけです。ありがとう!
"Resource temporarily unavailable" is the error message corresponding to EAGAIN, which means that the operation would have blocked but nonblocking operation was requested. For send(), that could be due to any of:
fcntl(); orMSG_DONTWAIT flag to send(); orSO_SNDTIMEO socket option.これは、non-blockingソケットを使用していて、出力バッファーがいっぱいであるためです。
send()マニュアルページから
When the message does not fit into the send buffer of the socket,
send() normally blocks, unless the socket has been placed in non-block-
ing I/O mode. In non-blocking mode it would return EAGAIN in this
case.
EAGAINは、 「リソースが一時的に利用できません」に関連付けられているエラー コードです。
select()この動作をより適切に制御するために使用することを検討してください