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: Mon, 11 May 2009 11:57:16 -0500
User-agent: Thunderbird 2.0.0.21 (X11/20090320)

Daniel P. Berrange wrote:
On Mon, May 11, 2009 at 11:16:24AM -0500, Anthony Liguori wrote:
Any system call can return EINTR just about.  It's not just read/write.

For many system calls you can have them auto-restarted after EINTR
by using sigaction() with the SA_RESTART flag. IIRC read/write/poll won't support restarts in this way though, because of the problem of
partial data read/writes and partial timeouts for poll meaning you
can't auto-restart them without app developer help

SA_RESTART in theory is supposed to cover everything IIUC. I don't know that that's true in Linux in practice though. I definitely don't know about other Unices.

I don't think there's a standard way to know which syscalls would be restarted and which ones would. If you expect EINTR, I think you pretty much have to handle it everywhere.

Regards,

Anthony Liguori

Daniel





reply via email to

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