RTEMS | libmisc/shell: Only restore terminal settings on exit when captured (!300)
Sebastian Huber (@sebhub)
gitlab at rtems.org
Tue Nov 12 05:13:14 UTC 2024
Sebastian Huber commented on a discussion on cpukit/libmisc/shell/shell.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/300#note_114747
> return false;
> }
> /* Make a raw terminal, Linux Manuals */
> - if (tcgetattr(fileno(stdin), &previous_term) >= 0) {
> + if ((tc_result = tcgetattr(fileno(stdin), &previous_term)) >= 0) {
According to the man page, `tcgetattr()` and `tcsetattr()` return `0` on success. So, the check should be changed accordingly.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/300#note_114747
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20241112/15b6d23c/attachment.htm>
More information about the bugs
mailing list