mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 05:16:47 +08:00
Modify SIGSTP to SIGTSTP
Follow the POSIX description. SIGTSTP should be sent when the Ctrl-Z characters is encountered, not SIGSTP. Testing: Built with hifive1-revb:nsh (CONFIG_SERIAL_TERMIOS=y, CONFIG_SIG_DEFAULT=y and CONFIG_TTY_SIGTSTP=y)
This commit is contained in:
committed by
Xiang Xiao
parent
96d1f018c4
commit
c13f869432
@@ -68,7 +68,7 @@
|
||||
#endif
|
||||
|
||||
#undef HAVE_SIGNALS
|
||||
#if defined(CONFIG_TTY_SIGINT) || defined(CONFIG_TTY_SIGSTP)
|
||||
#if defined(CONFIG_TTY_SIGINT) || defined(CONFIG_TTY_SIGTSTP)
|
||||
# define HAVE_SIGNALS
|
||||
#endif
|
||||
|
||||
@@ -289,18 +289,18 @@ static void telnet_check_ctrlchar(FAR struct telnet_dev_s *priv,
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TTY_SIGSTP
|
||||
/* Is this the special character that will generate the SIGSTP
|
||||
#ifdef CONFIG_TTY_SIGTSTP
|
||||
/* Is this the special character that will generate the SIGTSTP
|
||||
* signal?
|
||||
*/
|
||||
|
||||
if (*buffer == CONFIG_TTY_SIGSTP_CHAR)
|
||||
if (*buffer == CONFIG_TTY_SIGTSTP_CHAR)
|
||||
{
|
||||
/* Note that the kill is needed and do not put the character
|
||||
* into the Rx buffer. It should not be read as normal data.
|
||||
*/
|
||||
|
||||
signo = SIGSTP;
|
||||
signo = SIGTSTP;
|
||||
#ifndef CONFIG_TTY_SIGINT
|
||||
break;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user