summaryrefslogtreecommitdiff
path: root/cpukit/rtems
diff options
context:
space:
mode:
authorJoel Sherrill <joel@rtems.org>2019-10-02 16:49:00 -0500
committerJoel Sherrill <joel@rtems.org>2019-10-08 14:25:41 -0500
commit667501a314ba75f80f1c13c6b43dd35d0a00efd1 (patch)
treeec786d34150d19f7aac04b2653fa356c6a696de2 /cpukit/rtems
parentff4a4a862bc631936aa4fd1c17f181197b91db29 (diff)
termios: Add Capability to Generate SIGINTR and SIGQUIT
This patch adds the ability for termios to send SIGINTR on receipt of VINTR and SIGQUIT for VKILL and return -1/EINTR from read() on a termios channel. Importantly, this patch does not alter the default behavior or force POSIX signal code in just because termios is used. The application must explicitly enable the POSIX behavior of generating a signal upon receipt of these characters. This is discussed in the POSIX standard: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap11.html Closes #3800.
Diffstat (limited to 'cpukit/rtems')
-rw-r--r--cpukit/rtems/src/statustext.c1
-rw-r--r--cpukit/rtems/src/statustoerrno.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/cpukit/rtems/src/statustext.c b/cpukit/rtems/src/statustext.c
index f701ebd356..23697942fd 100644
--- a/cpukit/rtems/src/statustext.c
+++ b/cpukit/rtems/src/statustext.c
@@ -53,6 +53,7 @@ static const char *const status_code_text[] = {
"RTEMS_INTERNAL_ERROR",
"RTEMS_NO_MEMORY",
"RTEMS_IO_ERROR",
+ "RTEMS_INTERRUPTED",
"RTEMS_PROXY_BLOCKING"
};
diff --git a/cpukit/rtems/src/statustoerrno.c b/cpukit/rtems/src/statustoerrno.c
index 8f34ff5921..76a9e2c056 100644
--- a/cpukit/rtems/src/statustoerrno.c
+++ b/cpukit/rtems/src/statustoerrno.c
@@ -45,6 +45,7 @@ static const int status_code_to_errno [RTEMS_STATUS_CODES_LAST + 1] = {
[RTEMS_INTERNAL_ERROR] = EIO,
[RTEMS_NO_MEMORY] = ENOMEM,
[RTEMS_IO_ERROR] = EIO,
+ [RTEMS_INTERRUPTED] = EINTR,
[RTEMS_PROXY_BLOCKING] = EIO
};