]> diplodocus.org Git - nmh/blobdiff - sbr/getpass.c
crawl_folders.h: Rename to be alongside implementation.
[nmh] / sbr / getpass.c
index 4b24af3c137299c3ce77097e46c6a01ec9bb2964..66f02da12a37c22997476fb97009cbb1e685096b 100644 (file)
@@ -32,7 +32,8 @@
  * SUCH DAMAGE.
  */
 
-#include <h/mh.h>
+#include "h/mh.h"
+#include "getpass.h"
 #include <termios.h>
 
 /* We don't use MAX_PASS here because the maximum password length on a remote
@@ -78,7 +79,7 @@ nmh_getpass(const char *prompt)
     *p++ = ch;
   *p = '\0';
 
-  if (istty) {
+  if (istty && fin != stdin) {
     (void)tcsetattr(fileno(fin), TCSANOW, &oterm);
     rewind(fout);
     (void)fputc('\n', fout);