aboutsummaryrefslogtreecommitdiff
path: root/qemu-img.c
diff options
context:
space:
mode:
authorMORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>2013-07-23 17:30:11 +0900
committerKevin Wolf <kwolf@redhat.com>2013-08-06 10:41:56 +0200
commit526eda14a68d5b3596be715505289b541288ef2a (patch)
treed63aa37d16d4f1458e190a79e6822acf51f5d184 /qemu-img.c
parentfc11eb26cee7e3621645dd40cd9de944201f590b (diff)
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 <morita.kazutaka@lab.ntt.co.jp> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qemu-img.c')
-rw-r--r--qemu-img.c4
1 files changed, 4 insertions, 0 deletions
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();