diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-06-10 03:53:59 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-06-10 03:53:59 +0000 |
commit | 6307b01b53b56fd155bc2ce8ff7dc424822288d5 (patch) | |
tree | 7b6f545448c60e0c7b788647fa1deefc4ef04bfd /src | |
parent | cfb8fc9d7bbb632b404deab526b39241d985877e (diff) | |
download | postgresql-6307b01b53b56fd155bc2ce8ff7dc424822288d5.tar.gz postgresql-6307b01b53b56fd155bc2ce8ff7dc424822288d5.zip |
Fix some more gratuitous breakage ... also throw in a couple of
fflush(stderr)'s for good luck.
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/pg_dump/pg_dump.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 5482c9da149..d8111fd4236 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -22,7 +22,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.150 2000/06/09 12:33:42 momjian Exp $ + * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.151 2000/06/10 03:53:59 tgl Exp $ * * Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb * @@ -490,9 +490,11 @@ prompt_for_password(char *username, char *password) #ifdef HAVE_TERMIOS_H struct termios t_orig, + t; #endif fprintf(stderr, "Username: "); + fflush(stderr); fgets(username, 100, stdin); length = strlen(username); /* skip rest of the line */ @@ -506,13 +508,14 @@ prompt_for_password(char *username, char *password) if (length > 0 && username[length - 1] == '\n') username[length - 1] = '\0'; - fprintf(stderr, "Password: "); #ifdef HAVE_TERMIOS_H tcgetattr(0, &t); t_orig = t; t.c_lflag &= ~ECHO; tcsetattr(0, TCSADRAIN, &t); #endif + fprintf(stderr, "Password: "); + fflush(stderr); fgets(password, 100, stdin); #ifdef HAVE_TERMIOS_H tcsetattr(0, TCSADRAIN, &t_orig); |