qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: "Daniel P. Berrange" <berrange@redhat.com>
Cc: Stuart Brady <stuart.brady@gmail.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] suppress 'warn_unused_result' warning
Date: Mon, 11 May 2009 11:57:16 -0500	[thread overview]
Message-ID: <4A0858EC.4080509@codemonkey.ws> (raw)
In-Reply-To: <20090511162520.GB1579@redhat.com>

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	other threads:[~2009-05-11 16:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-10 19:15 [Qemu-devel] [PATCH] suppress 'warn_unused_result' warning Chih-Min Chao
2009-05-10 22:11 ` Paul Brook
2009-05-10 22:15 ` Stuart Brady
2009-05-10 23:19   ` Anthony Liguori
2009-05-11  1:53   ` M. Warner Losh
2009-05-11 15:42     ` Stuart Brady
2009-05-11 16:02       ` Paul Brook
2009-05-11 16:16       ` Anthony Liguori
2009-05-11 16:25         ` Daniel P. Berrange
2009-05-11 16:57           ` Anthony Liguori [this message]
2009-05-12 12:19             ` Jamie Lokier
2009-05-11 17:02       ` Jamie Lokier
2009-05-11 16:15 ` Daniel P. Berrange

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A0858EC.4080509@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=berrange@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stuart.brady@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).