blob: 5f505fecb4540b95d69053fc9fa68e762cd4df7e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
/**
* @file
* TERMIOS POSIX behavior on INTR and QUIT characters
*/
/*
* COPYRIGHT (c) 1989-2012,2019.
* On-Line Applications Research Corporation (OAR).
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems.h>
#include <rtems/libio.h>
#include <rtems/termiostypes.h>
#include <signal.h>
rtems_termios_iproc_status_code rtems_termios_posix_isig_handler(
unsigned char c,
struct rtems_termios_tty *tty
)
{
int sig;
if ( c == tty->termios.c_cc[ VQUIT ] ) {
sig = SIGQUIT;
} else {
sig = SIGINT;
}
(void) raise( sig );
return RTEMS_TERMIOS_IPROC_INTERRUPT;
}
|