system/cu/cu_main.c: ctrlC will send SIGINT/SIGSTP

N/A

Change-Id: I67f02977d206875cf1bd9cae4973c49af1db4c1d
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd 2020-10-23 11:22:33 +08:00 committed by Xiang Xiao
parent 2279eeb0a7
commit d791afff4c

View File

@ -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)