[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] suppress 'warn_unused_result' warning
From: |
Stuart Brady |
Subject: |
Re: [Qemu-devel] [PATCH] suppress 'warn_unused_result' warning |
Date: |
Sun, 10 May 2009 23:15:00 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
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?
Is it acceptable to have a wrapper around these functions that retries
if the call fails with EINTR?
I would guess that for the most part, getting EINTR back is pretty rare,
as there's an awful lot of code (in QEMU and in other projects) that
doesn't check for it.
BTW, is it be possible for the write in qemu_event_increment() to
io_thread_fd to fail with EAGAIN? If so, aborting with perror()
probably isn't right.
--
Stuart Brady
- [Qemu-devel] [PATCH] suppress 'warn_unused_result' warning, Chih-Min Chao, 2009/05/10
- Re: [Qemu-devel] [PATCH] suppress 'warn_unused_result' warning, Paul Brook, 2009/05/10
- Re: [Qemu-devel] [PATCH] suppress 'warn_unused_result' warning,
Stuart Brady <=
- Re: [Qemu-devel] [PATCH] suppress 'warn_unused_result' warning, Anthony Liguori, 2009/05/10
- Re: [Qemu-devel] [PATCH] suppress 'warn_unused_result' warning, M. Warner Losh, 2009/05/10
- Re: [Qemu-devel] [PATCH] suppress 'warn_unused_result' warning, Stuart Brady, 2009/05/11
- Re: [Qemu-devel] [PATCH] suppress 'warn_unused_result' warning, Paul Brook, 2009/05/11
- Re: [Qemu-devel] [PATCH] suppress 'warn_unused_result' warning, Anthony Liguori, 2009/05/11
- Re: [Qemu-devel] [PATCH] suppress 'warn_unused_result' warning, Daniel P. Berrange, 2009/05/11
- Re: [Qemu-devel] [PATCH] suppress 'warn_unused_result' warning, Anthony Liguori, 2009/05/11
- Re: [Qemu-devel] [PATCH] suppress 'warn_unused_result' warning, Jamie Lokier, 2009/05/12
- Re: [Qemu-devel] [PATCH] suppress 'warn_unused_result' warning, Jamie Lokier, 2009/05/11
Re: [Qemu-devel] [PATCH] suppress 'warn_unused_result' warning, Daniel P. Berrange, 2009/05/11