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:
Yoshinori Sugino
2020-10-29 13:53:41 +09:00
committed by Xiang Xiao
parent 96d1f018c4
commit c13f869432
22 changed files with 57 additions and 57 deletions
+5 -5
View File
@@ -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