Skip to content

Commit 6307b01

Browse files
committed
Fix some more gratuitous breakage ... also throw in a couple of
fflush(stderr)'s for good luck.
1 parent cfb8fc9 commit 6307b01

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/bin/pg_dump/pg_dump.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*
2323
*
2424
* IDENTIFICATION
25-
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.150 2000/06/09 12:33:42 momjian Exp $
25+
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.151 2000/06/10 03:53:59 tgl Exp $
2626
*
2727
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
2828
*
@@ -490,9 +490,11 @@ prompt_for_password(char *username, char *password)
490490

491491
#ifdef HAVE_TERMIOS_H
492492
struct termios t_orig,
493+
t;
493494
#endif
494495

495496
fprintf(stderr, "Username: ");
497+
fflush(stderr);
496498
fgets(username, 100, stdin);
497499
length = strlen(username);
498500
/* skip rest of the line */
@@ -506,13 +508,14 @@ prompt_for_password(char *username, char *password)
506508
if (length > 0 && username[length - 1] == '\n')
507509
username[length - 1] = '\0';
508510

509-
fprintf(stderr, "Password: ");
510511
#ifdef HAVE_TERMIOS_H
511512
tcgetattr(0, &t);
512513
t_orig = t;
513514
t.c_lflag &= ~ECHO;
514515
tcsetattr(0, TCSADRAIN, &t);
515516
#endif
517+
fprintf(stderr, "Password: ");
518+
fflush(stderr);
516519
fgets(password, 100, stdin);
517520
#ifdef HAVE_TERMIOS_H
518521
tcsetattr(0, TCSADRAIN, &t_orig);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy