[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 1/9] ignore SIGPIPE in qemu-img and qemu-io
From: |
MORITA Kazutaka |
Subject: |
[Qemu-devel] [PATCH v2 1/9] ignore SIGPIPE in qemu-img and qemu-io |
Date: |
Wed, 24 Jul 2013 16:56:25 +0900 |
This prevents the tools from being stopped when they write data to a
closed connection in the other side.
Reviewed-by: Paolo Bonzini <address@hidden>
Signed-off-by: MORITA Kazutaka <address@hidden>
---
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
+
error_set_progname(argv[0]);
qemu_init_main_loop();
diff --git a/qemu-io.c b/qemu-io.c
index cb9def5..d54dc86 100644
--- a/qemu-io.c
+++ b/qemu-io.c
@@ -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) {
--
1.8.1.3.566.gaa39828
- [Qemu-devel] [PATCH v2 0/9] sheepdog: reconnect server after connection failure, MORITA Kazutaka, 2013/07/24
- [Qemu-devel] [PATCH v2 4/9] sheepdog: handle vdi objects in resend_aio_req, MORITA Kazutaka, 2013/07/24
- [Qemu-devel] [PATCH v2 2/9] iov: handle EOF in iov_send_recv, MORITA Kazutaka, 2013/07/24
- [Qemu-devel] [PATCH v2 1/9] ignore SIGPIPE in qemu-img and qemu-io,
MORITA Kazutaka <=
- [Qemu-devel] [PATCH v2 3/9] sheepdog: check return values of qemu_co_recv/send correctly, MORITA Kazutaka, 2013/07/24
- [Qemu-devel] [PATCH v2 7/9] sheepdog: try to reconnect to sheepdog after network error, MORITA Kazutaka, 2013/07/24
- [Qemu-devel] [PATCH v2 5/9] sheepdog: reload inode outside of resend_aioreq, MORITA Kazutaka, 2013/07/24
- [Qemu-devel] [PATCH v2 6/9] coroutine: add co_aio_sleep_ns() to allow sleep in block drivers, MORITA Kazutaka, 2013/07/24
- [Qemu-devel] [PATCH v2 8/9] sheepdog: make add_aio_request and send_aioreq void functions, MORITA Kazutaka, 2013/07/24
- [Qemu-devel] [PATCH v2 9/9] sheepdog: cancel aio requests if possible, MORITA Kazutaka, 2013/07/24
- Re: [Qemu-devel] [sheepdog] [PATCH v2 0/9] sheepdog: reconnect server after connection failure, Liu Yuan, 2013/07/24