From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60211) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4AB7-0006zr-4A for qemu-devel@nongnu.org; Tue, 30 Jul 2013 09:41:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V4AAy-0008Fv-Dq for qemu-devel@nongnu.org; Tue, 30 Jul 2013 09:41:29 -0400 Received: from mail-we0-x229.google.com ([2a00:1450:400c:c03::229]:45322) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4AAy-0008Fq-5W for qemu-devel@nongnu.org; Tue, 30 Jul 2013 09:41:20 -0400 Received: by mail-we0-f169.google.com with SMTP id n5so4413839wev.28 for ; Tue, 30 Jul 2013 06:41:19 -0700 (PDT) Date: Tue, 30 Jul 2013 15:41:16 +0200 From: Stefan Hajnoczi Message-ID: <20130730134116.GA7471@stefanha-thinkpad.redhat.com> References: <1374819052-4292-1-git-send-email-morita.kazutaka@lab.ntt.co.jp> <1374819052-4292-2-git-send-email-morita.kazutaka@lab.ntt.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1374819052-4292-2-git-send-email-morita.kazutaka@lab.ntt.co.jp> Subject: Re: [Qemu-devel] [PATCH v4 01/10] ignore SIGPIPE in qemu-img and qemu-io List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: MORITA Kazutaka Cc: Kevin Wolf , sheepdog@lists.wpkg.org, qemu-devel@nongnu.org, Stefan Hajnoczi , Liu Yuan , Paolo Bonzini On Fri, Jul 26, 2013 at 03:10:43PM +0900, MORITA Kazutaka wrote: > This prevents the tools from being stopped when they write data to a > closed connection in the other side. > > Reviewed-by: Paolo Bonzini > Signed-off-by: MORITA Kazutaka > --- > qemu-img.c | 4 ++++ > qemu-io.c | 4 ++++ > 2 files changed, 8 insertions(+) > > diff --git a/qemu-img.c b/qemu-img.c > index c55ca5c..919d464 100644 > --- a/qemu-img.c > +++ b/qemu-img.c > @@ -2319,6 +2319,10 @@ int main(int argc, char **argv) > const img_cmd_t *cmd; > const char *cmdname; > > +#ifdef CONFIG_POSIX > + signal(SIGPIPE, SIG_IGN); > +#endif Reusing os_setup_early_signal_handling() would be messy, this seems fine for now. Reviewed-by: Stefan Hajnoczi