diff options
-rw-r--r-- | qemu-img.c | 4 | ||||
-rw-r--r-- | qemu-io.c | 4 |
2 files changed, 8 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(); @@ -335,6 +335,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) { |