|
@@ -63,8 +63,11 @@ getpass (prompt)
|
|
|
|
|
|
t.c_lflag &= ~(ECHO|ISIG);
|
|
|
tty_changed = (tcsetattr (fileno (in), TCSAFLUSH|TCSASOFT, &t) == 0);
|
|
|
-
|
|
|
- setvbuf(in, NULL, _IOLBF, 0);
|
|
|
+ if (in != stdin) {
|
|
|
+
|
|
|
+ * fseek and buffering for read/write auto-transitioning. */
|
|
|
+ setvbuf(in, NULL, _IONBF, 0);
|
|
|
+ }
|
|
|
}
|
|
|
else
|
|
|
tty_changed = 0;
|
|
@@ -93,8 +96,6 @@ getpass (prompt)
|
|
|
|
|
|
if (tty_changed) {
|
|
|
(void) tcsetattr (fileno (in), TCSAFLUSH|TCSASOFT, &s);
|
|
|
-
|
|
|
- setlinebuf(in);
|
|
|
}
|
|
|
|
|
|
if (in != stdin)
|