From d791afff4c0093fb593a6f86bffadefa0a4128c2 Mon Sep 17 00:00:00 2001 From: ligd Date: Fri, 23 Oct 2020 11:22:33 +0800 Subject: [PATCH] system/cu/cu_main.c: ctrlC will send SIGINT/SIGSTP N/A Change-Id: I67f02977d206875cf1bd9cae4973c49af1db4c1d Signed-off-by: ligd --- system/cu/cu_main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/system/cu/cu_main.c b/system/cu/cu_main.c index 621088d3d..d04945080 100644 --- a/system/cu/cu_main.c +++ b/system/cu/cu_main.c @@ -61,8 +61,10 @@ * Pre-processor Definitions ****************************************************************************/ -#ifndef SIGKILL -# define SIGKILL 9 +#ifndef CONFIG_SIG_INT +# define SIGINT 10 +#else +# define SIGINT CONFIG_SIG_INT #endif /**************************************************************************** @@ -311,7 +313,7 @@ int main(int argc, FAR char *argv[]) memset(&sa, 0, sizeof(sa)); sa.sa_handler = sigint; - sigaction(SIGKILL, &sa, NULL); + sigaction(SIGINT, &sa, NULL); optind = 0; /* global that needs to be reset in FLAT mode */ while ((option = getopt(argc, argv, "l:s:cefhor?")) != ERROR)