From: Claudio Fontana <claudio.fontana@suse.com>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH v2] ivshmem-server: Terminate also on SIGINT
Date: Sun, 4 Aug 2019 04:00:00 +0200 [thread overview]
Message-ID: <ce18dea4-8c8d-c278-4510-459cd1916912@suse.de> (raw)
In-Reply-To: <99c1a7bd-1876-66a2-4b8e-d5bc86116fe7@web.de>
On 8/3/19 3:22 PM, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> Allows to shutdown a foreground session via ctrl-c.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>
> Changes in v2:
> - adjust error message
>
> 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 197c79c57e..e4cd35f74c 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.16.4
>
>
Reviewed-by: Claudio Fontana <claudio.fontana@suse.com>
next prev parent reply other threads:[~2019-08-04 2:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-03 13:22 [Qemu-devel] [PATCH v2] ivshmem-server: Terminate also on SIGINT Jan Kiszka
2019-08-04 2:00 ` Claudio Fontana [this message]
2019-08-05 8:33 ` Stefano Garzarella
2019-08-05 10:06 ` Jan Kiszka
2019-11-08 9:08 ` Jan Kiszka
2019-11-08 15:15 ` Markus Armbruster
2019-11-12 9:37 ` Laurent Vivier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ce18dea4-8c8d-c278-4510-459cd1916912@suse.de \
--to=claudio.fontana@suse.com \
--cc=jan.kiszka@web.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).