22
22
*
23
23
*
24
24
* 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 $
26
26
*
27
27
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
28
28
*
@@ -490,9 +490,11 @@ prompt_for_password(char *username, char *password)
490
490
491
491
#ifdef HAVE_TERMIOS_H
492
492
struct termios t_orig ,
493
+ t ;
493
494
#endif
494
495
495
496
fprintf (stderr ,"Username: " );
497
+ fflush (stderr );
496
498
fgets (username ,100 ,stdin );
497
499
length = strlen (username );
498
500
/* skip rest of the line */
@@ -506,13 +508,14 @@ prompt_for_password(char *username, char *password)
506
508
if (length > 0 && username [length - 1 ]== '\n' )
507
509
username [length - 1 ]= '\0' ;
508
510
509
- fprintf (stderr ,"Password: " );
510
511
#ifdef HAVE_TERMIOS_H
511
512
tcgetattr (0 ,& t );
512
513
t_orig = t ;
513
514
t .c_lflag &= ~ECHO ;
514
515
tcsetattr (0 ,TCSADRAIN ,& t );
515
516
#endif
517
+ fprintf (stderr ,"Password: " );
518
+ fflush (stderr );
516
519
fgets (password ,100 ,stdin );
517
520
#ifdef HAVE_TERMIOS_H
518
521
tcsetattr (0 ,TCSADRAIN ,& t_orig );