Commit c7e19f9b authored by Howard Chu's avatar Howard Chu
Browse files

ITS#6702 prompts should be on stderr

parent acedf4f1
......@@ -103,8 +103,8 @@ lutil_getpass( const char *prompt )
#else
fi = stdin;
#endif
fprintf(stdout, "%s", prompt);
fflush(stdout);
fprintf(stderr, "%s", prompt);
fflush(stderr);
i = 0;
while ( (c = getc(fi)) != EOF && c != '\n' && c != '\r' )
if ( i < (sizeof(pbuf)-1) )
......@@ -112,8 +112,8 @@ lutil_getpass( const char *prompt )
#if defined(HAVE_TERMIOS_H) || defined(HAVE_SGTTY_H)
/* tidy up */
if (fi != stdin) {
fprintf(stdout, "\n");
fflush(stdout);
fprintf(stderr, "\n");
fflush(stderr);
SETFLAGS( ttyb, flags );
if (SETATTR(fileno(fi), &ttyb) < 0)
perror("SETATTR");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment