qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Re: [PATCH 01/14] Introduce qemu_write_full()


From: Jamie Lokier
Subject: Re: [Qemu-devel] Re: [PATCH 01/14] Introduce qemu_write_full()
Date: Wed, 20 Jan 2010 01:30:13 +0000
User-agent: Mutt/1.5.13 (2006-08-11)

Anthony Liguori wrote:
> >-        write(posix_aio_state->wfd,&byte, sizeof(byte));
> >+        ret = write(posix_aio_state->wfd,&byte, sizeof(byte));
> >+        if (ret<  0&&  errno != EAGAIN)
> >+            die("write()");
> >      }
> >
> >if write() fails in a pipe in the signal handler, I am at a lost about
> >what to do here.
> 
> That's nothing we can do.  I guess exiting is reasonable.

At least retry if it returns EINTR.  That can happen in a signal
handler, if the handler does not block all other signals.

-- Jamie




reply via email to

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