[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 5/5] ivshmem-server: Terminate also on SIGINT
From: |
Laurent Vivier |
Subject: |
[PULL 5/5] ivshmem-server: Terminate also on SIGINT |
Date: |
Tue, 12 Nov 2019 11:04:29 +0100 |
From: Jan Kiszka <address@hidden>
Allows to shutdown a foreground session via ctrl-c.
Signed-off-by: Jan Kiszka <address@hidden>
Reviewed-by: Claudio Fontana <address@hidden>
Reviewed-by: Stefano Garzarella <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>
---
contrib/ivshmem-server/main.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/contrib/ivshmem-server/main.c b/contrib/ivshmem-server/main.c
index 197c79c57ec2..e4cd35f74c61 100644
--- a/contrib/ivshmem-server/main.c
+++ b/contrib/ivshmem-server/main.c
@@ -223,8 +223,9 @@ main(int argc, char *argv[])
sa_quit.sa_handler = ivshmem_server_quit_cb;
sa_quit.sa_flags = 0;
if (sigemptyset(&sa_quit.sa_mask) == -1 ||
- sigaction(SIGTERM, &sa_quit, 0) == -1) {
- perror("failed to add SIGTERM handler; sigaction");
+ sigaction(SIGTERM, &sa_quit, 0) == -1 ||
+ sigaction(SIGINT, &sa_quit, 0) == -1) {
+ perror("failed to add signal handler; sigaction");
goto err;
}
--
2.21.0
- [PULL 0/5] Trivial branch patches, Laurent Vivier, 2019/11/12
- [PULL 3/5] numa: Add missing \n to error message, Laurent Vivier, 2019/11/12
- [PULL 2/5] qom: Fix error message in object_class_property_add(), Laurent Vivier, 2019/11/12
- [PULL 1/5] Makefile: install bios-microvm like other binary blobs, Laurent Vivier, 2019/11/12
- [PULL 5/5] ivshmem-server: Terminate also on SIGINT,
Laurent Vivier <=
- [PULL 4/5] ivshmem-server: Clean up shmem on shutdown, Laurent Vivier, 2019/11/12
- Re: [PULL 0/5] Trivial branch patches, Peter Maydell, 2019/11/12