stop touching the wrong stamp filename after configuring
[debian/sudo] / term.c
diff --git a/term.c b/term.c
index a3cad619687761ff0d78091495b4adc502ec3f6d..b1e9da65f07efb24f69578fcf67a7259519587d5 100644 (file)
--- a/term.c
+++ b/term.c
@@ -151,10 +151,11 @@ term_raw(fd, isig)
     /* Set terminal to raw mode */
     term.c_cc[VMIN] = 1;
     term.c_cc[VTIME] = 0;
-    CLR(term.c_lflag, ECHO | ECHONL | ICANON | ISIG | IEXTEN);
+    CLR(term.c_iflag, ICRNL | IGNCR | INLCR | IUCLC | IXON);
+    SET(term.c_oflag, OPOST);
+    CLR(term.c_lflag, ECHO | ICANON | ISIG | IEXTEN);
     if (isig)
        SET(term.c_lflag, ISIG);
-    CLR(term.c_iflag, ICRNL | IGNCR | INLCR | IUCLC | IXON);
     if (tcsetattr(fd, TCSADRAIN|TCSASOFT, &term) == 0) {
        changed = 1;
        return(1);