qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] suppress 'warn_unused_result' warning


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH] suppress 'warn_unused_result' warning
Date: Sun, 10 May 2009 18:19:34 -0500
User-agent: Thunderbird 2.0.0.21 (X11/20090409)

Stuart Brady wrote:
On Mon, May 11, 2009 at 03:15:11AM +0800, Chih-Min Chao wrote:
The patch add error handling to functions with 'warn_unused_result' return
value such as write, read, ftruncate, and realpath.

I'm slightly concerned -- read(), write() and ftruncate() can fail with
EINTR if a signal is received at an unfortunate time, can't they?

Do we mitigate this for the most part, somehow?

Do kernels try to avoid this behaviour?  If so, under what circumstances
might EINTR still be returned?

EINTR is rather unfortunate. A lot of libraries don't handle it well, for instance.

One the IO thread stabilizes and we can enable it by default, we'll be able to eliminate signaling in the IO thread and thereby eliminate all of the potentially buggy EINTR handling.

I think that's the best path forward.

NB we would still send the TCG thread signals to break it out of execution but the TCG thread should not generally be doing system calls.


Regards,

Anthony Liguori




reply via email to

[Prev in Thread] Current Thread [Next in Thread]