From: Howard Chu Date: Fri, 12 Nov 2010 04:15:23 +0000 (+0000) Subject: ITS#6702 prompts should be on stderr X-Git-Tag: MIGRATION_CVS2GIT~437 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c7e19f9b6212e03976146f2ebc41797ca73df35e;p=openldap ITS#6702 prompts should be on stderr --- diff --git a/libraries/liblutil/getpass.c b/libraries/liblutil/getpass.c index 9deb0294ca..a49554c834 100644 --- a/libraries/liblutil/getpass.c +++ b/libraries/liblutil/getpass.c @@ -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");