Replace usage of SIGKILL with SIGINIT
This commit is contained in:
parent
1ee6fbf296
commit
bb4c5c49ef
@ -135,9 +135,9 @@ int nsh_builtin(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd,
|
|||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
/* Setup up to receive SIGKILL if control-C entered. The return
|
/* Setup up to receive SIGINT if control-C entered. The return
|
||||||
* value is ignored because this console device may not support
|
* value is ignored because this console device may not support
|
||||||
* SIGKILL.
|
* SIGINT.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(void)ioctl(stdout->fs_fd, TIOCSCTTY, ret);
|
(void)ioctl(stdout->fs_fd, TIOCSCTTY, ret);
|
||||||
|
@ -172,9 +172,9 @@ int nsh_fileapp(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd,
|
|||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
/* Setup up to receive SIGKILL if control-C entered. The return
|
/* Setup up to receive SIGINT if control-C entered. The return
|
||||||
* value is ignored because this console device may not support
|
* value is ignored because this console device may not support
|
||||||
* SIGKILL.
|
* SIGINT.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(void)ioctl(stdout->fs_fd, TIOCSCTTY, pid);
|
(void)ioctl(stdout->fs_fd, TIOCSCTTY, pid);
|
||||||
|
@ -61,18 +61,6 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef SIGINT
|
|
||||||
# define SIGINT 2
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef SIGKILL
|
|
||||||
# define SIGKILL 9
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef SIGTERM
|
|
||||||
# define SIGTERM 15
|
|
||||||
#endif
|
|
||||||
|
|
||||||
enum parity_mode
|
enum parity_mode
|
||||||
{
|
{
|
||||||
PARITY_NONE,
|
PARITY_NONE,
|
||||||
@ -297,8 +285,6 @@ int cu_main(int argc, FAR char *argv[])
|
|||||||
memset(&sa, 0, sizeof(sa));
|
memset(&sa, 0, sizeof(sa));
|
||||||
sa.sa_handler = sigint;
|
sa.sa_handler = sigint;
|
||||||
sigaction(SIGINT, &sa, NULL);
|
sigaction(SIGINT, &sa, NULL);
|
||||||
sigaction(SIGTERM, &sa, NULL);
|
|
||||||
sigaction(SIGKILL, &sa, NULL);
|
|
||||||
|
|
||||||
while ((option = getopt(argc, argv, "l:s:eor?")) != ERROR)
|
while ((option = getopt(argc, argv, "l:s:eor?")) != ERROR)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user