Commit b082ef7f authored by Magnus Hagander's avatar Magnus Hagander

Set stderr to unbuffered for pgbench on win32.

ITAGAKI Takahiro
parent b9527e98
/* /*
* $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.61 2007/01/22 02:17:30 tgl Exp $ * $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.62 2007/03/13 09:06:35 mha Exp $
* *
* pgbench: a simple benchmark program for PostgreSQL * pgbench: a simple benchmark program for PostgreSQL
* written by Tatsuo Ishii * written by Tatsuo Ishii
...@@ -1184,6 +1184,11 @@ main(int argc, char **argv) ...@@ -1184,6 +1184,11 @@ main(int argc, char **argv)
char val[64]; char val[64];
#ifdef WIN32
/* stderr is buffered on Win32. */
setvbuf(stderr, NULL, _IONBF, 0);
#endif
if ((env = getenv("PGHOST")) != NULL && *env != '\0') if ((env = getenv("PGHOST")) != NULL && *env != '\0')
pghost = env; pghost = env;
if ((env = getenv("PGPORT")) != NULL && *env != '\0') if ((env = getenv("PGPORT")) != NULL && *env != '\0')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment