在 2018/7/2 16:46, Paolo Bonzini 写道:
On 02/07/2018 02:49, xinhua.Cao wrote:
In the tcp_chr_write function, we checked errno,
but errno was not reset before a read or write operation.
Therefore, this check of errno's actions is often
incorrect after EAGAIN has occurred.
We reset errno before re
In the tcp_chr_write function, we checked errno,
but errno was not reset before a read or write operation.
Therefore, this check of errno's actions is often
incorrect after EAGAIN has occurred.
we need check errno together with ret < 0.
Signed-off-by: xinhua.Cao
---
chardev/char-socket.c | 7 +++
在 2018/7/2 23:01, Stefan Hajnoczi 写道:
On Mon, Jul 02, 2018 at 08:49:10AM +0800, xinhua.Cao wrote:
In the tcp_chr_write function, we checked errno,
but errno was not reset before a read or write operation.
Therefore, this check of errno's actions is often
incorrect after EAGAIN has occurred.
W
In the tcp_chr_write function, we checked errno,
but errno was not reset before a read or write operation.
Therefore, this check of errno's actions is often
incorrect after EAGAIN has occurred.
We reset errno before reading and writing to
ensure the correctness of errno's judgment
Signed-off-by: x