[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/2] unix_write: don't block on non-blocking fil
From: |
Ian Jackson |
Subject: |
Re: [Qemu-devel] [PATCH 1/2] unix_write: don't block on non-blocking file handles. |
Date: |
Fri, 18 Jul 2008 14:46:42 +0100 |
Gerd Hoffmann writes ("[Qemu-devel] [PATCH 1/2] unix_write: don't block on
non-blocking file handles."):
> - if (errno != EINTR && errno != EAGAIN)
> + if (errno == EINTR) {
> + continue;
> + } else if (errno == EAGAIN) {
> + if (!nonblock)
> + continue;
I think this patch is not harmful. However, it is I think always
correct to return EAGAIN to the caller. This is what I have in the
Xen qemu tree.
I submitted a patch to this effect, which replaced unix_{read,write}
with qemu_{read,write}, amongst other error-handling changes, on the
25th of January, under the subject line `[PATCH] check return value
from read() and write() properly'
There was a small amount of discussion including some critical
comments from Anthony Ligouri but I think I addressed all of those at
the time. Sadly the patch did not get accepted after that.
Ian.