sched/signal: Add support for SIGINT in addition to SIGKILL. drivers/serial: Use SIGINT instead of SIGKILL when control-C is pressed.

This commit is contained in:
Gregory Nutt
2018-08-28 12:15:31 -06:00
parent 0b60bbc6d3
commit 0756cf66ed
9 changed files with 70 additions and 47 deletions
+2 -2
View File
@@ -286,8 +286,8 @@ struct uart_dev_s
tcflag_t tc_iflag; /* Input modes */
tcflag_t tc_oflag; /* Output modes */
tcflag_t tc_lflag; /* Local modes */
#ifdef CONFIG_TTY_SIGKILL
pid_t pid; /* Thread PID to receive SIGKILL signals (-1 if none) */
#ifdef CONFIG_TTY_SIGINT
pid_t pid; /* Thread PID to receive SIGINT signals (-1 if none) */
#endif
#endif
+6 -1
View File
@@ -170,8 +170,13 @@
#endif
#ifdef CONFIG_SIG_DEFAULT
# ifndef CONFIG_SIG_INT
# define SIGINT 6 /* Sent when ctrl-c event */
# else
# define SIGINT CONFIG_SIG_INT
# endif
# ifndef CONFIG_SIG_KILL
# define SIGKILL 9 /* Sent when ctrl-c event (vs. standard SIGINT) */
# define SIGKILL 9 /* Sent from shell as 'kill -9 <task>' */
# else
# define SIGKILL CONFIG_SIG_KILL
# endif