mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-30 13:58:05 +00:00
For raw mode, don't bother clearing BRKINT or PARMRK and clear IUCLC
if it is defined.
This commit is contained in:
5
term.c
5
term.c
@@ -63,6 +63,9 @@ __unused static const char rcsid[] = "$Sudo$";
|
|||||||
#ifndef IEXTEN
|
#ifndef IEXTEN
|
||||||
# define IEXTEN 0
|
# define IEXTEN 0
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef IUCLC
|
||||||
|
# define IUCLC 0
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef _POSIX_VDISABLE
|
#ifndef _POSIX_VDISABLE
|
||||||
# ifdef VDISABLE
|
# ifdef VDISABLE
|
||||||
@@ -143,7 +146,7 @@ term_raw(fd)
|
|||||||
return(0);
|
return(0);
|
||||||
(void) memcpy(&term, &oterm, sizeof(term));
|
(void) memcpy(&term, &oterm, sizeof(term));
|
||||||
/* Set terminal to raw mode */
|
/* Set terminal to raw mode */
|
||||||
term.c_iflag &= ~(BRKINT|ICRNL|IGNCR|INLCR|IXON|PARMRK);
|
term.c_iflag &= ~(ICRNL|IGNCR|INLCR|IUCLC|IXON);
|
||||||
term.c_oflag &= ~OPOST;
|
term.c_oflag &= ~OPOST;
|
||||||
term.c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
|
term.c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
|
||||||
term.c_cc[VMIN] = 1;
|
term.c_cc[VMIN] = 1;
|
||||||
|
Reference in New Issue
Block a user