sudo_term_raw: change the isig argument into a flags field
There are current two flags: SUDO_TERM_ISIG (enable terminal signals) and SUDO_TERM_OFLAG (preserve output flags).
This commit is contained in:
@@ -629,7 +629,7 @@ setup_terminal(struct eventlog *evlog, bool interactive, bool resize)
|
||||
/* Open fd for /dev/tty and set to raw mode. */
|
||||
if (interactive) {
|
||||
ttyfd = open(_PATH_TTY, O_RDWR);
|
||||
while (!sudo_term_raw(ttyfd, 1)) {
|
||||
while (!sudo_term_raw(ttyfd, SUDO_TERM_ISIG)) {
|
||||
if (errno != EINTR)
|
||||
sudo_fatal("%s", U_("unable to set tty to raw mode"));
|
||||
kill(getpid(), SIGTTOU);
|
||||
|
Reference in New Issue
Block a user