From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NXPOq-0002LR-GF for qemu-devel@nongnu.org; Tue, 19 Jan 2010 20:30:24 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NXPOl-0002Jz-NZ for qemu-devel@nongnu.org; Tue, 19 Jan 2010 20:30:23 -0500 Received: from [199.232.76.173] (port=58514 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NXPOl-0002Jw-L2 for qemu-devel@nongnu.org; Tue, 19 Jan 2010 20:30:19 -0500 Received: from mail2.shareable.org ([80.68.89.115]:38430) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NXPOl-00060D-1d for qemu-devel@nongnu.org; Tue, 19 Jan 2010 20:30:19 -0500 Date: Wed, 20 Jan 2010 01:30:13 +0000 From: Jamie Lokier Subject: Re: [Qemu-devel] Re: [PATCH 01/14] Introduce qemu_write_full() Message-ID: <20100120013013.GD11920@shareable.org> References: <1262223199-19062-1-git-send-email-kirill@shutemov.name> <4B560B6A.4090303@codemonkey.ws> <4B565684.2080809@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B565684.2080809@codemonkey.ws> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: "Kirill A. Shutemov" , qemu-devel@nongnu.org, Juan Quintela 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