From 526eda14a68d5b3596be715505289b541288ef2a Mon Sep 17 00:00:00 2001 From: MORITA Kazutaka Date: Tue, 23 Jul 2013 17:30:11 +0900 Subject: ignore SIGPIPE in qemu-img and qemu-io This prevents the tools from being stopped when they write data to a closed connection in the other side. Signed-off-by: MORITA Kazutaka Reviewed-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- qemu-img.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'qemu-img.c') diff --git a/qemu-img.c b/qemu-img.c index dece1b3a3a..b9a848db74 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -2322,6 +2322,10 @@ int main(int argc, char **argv) const img_cmd_t *cmd; const char *cmdname; +#ifdef CONFIG_POSIX + signal(SIGPIPE, SIG_IGN); +#endif + error_set_progname(argv[0]); qemu_init_main_loop(); -- cgit v1.2.1