mirror of
https://github.com/apache/nuttx.git
synced 2026-09-22 22:55:02 +08:00
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:
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user