diff options
author | MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp> | 2013-07-23 17:30:11 +0900 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2013-08-13 09:30:50 -0500 |
commit | 82487399a46649f152def5682bfc41b18e32b5f9 (patch) | |
tree | cd1eaa48adb13adde53593956ba0ade3d8062df7 /qemu-io.c | |
parent | 405539005133bc3e7bb0c016ede3167eafac1df9 (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>
(cherry picked from commit 526eda14a68d5b3596be715505289b541288ef2a)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'qemu-io.c')
-rw-r--r-- | qemu-io.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1920,6 +1920,10 @@ int main(int argc, char **argv) int opt_index = 0; int flags = BDRV_O_UNMAP; +#ifdef CONFIG_POSIX + signal(SIGPIPE, SIG_IGN); +#endif + progname = basename(argv[0]); while ((c = getopt_long(argc, argv, sopt, lopt, &opt_index)) != -1) { |