Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 15a6cd0

Browse files
committed
If the password prompt goes to stderr, then the trailing newline should
also go there.
1 parent eb1b164 commit 15a6cd0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bin/psql/common.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright 2000 by PostgreSQL Global Development Group
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/common.c,v 1.31 2001/03/01 18:34:29 tgl Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/common.c,v 1.32 2001/04/15 00:43:37 petere Exp $
77
*/
88
#include "postgres_fe.h"
99

@@ -208,7 +208,7 @@ simple_prompt(const char *prompt, int maxlen, bool echo)
208208
if (!echo)
209209
{
210210
tcsetattr(0, TCSADRAIN, &t_orig);
211-
puts("");
211+
fputs("\n", stderr);
212212
}
213213
#endif
214214

0 commit comments

Comments
 (0)