Skip to content

Commit b082ef7

Browse files
committed
Set stderr to unbuffered for pgbench on win32.
ITAGAKI Takahiro
1 parent b9527e9 commit b082ef7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

contrib/pgbench/pgbench.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.61 2007/01/22 02:17:30 tgl Exp $
2+
* $PostgreSQL: pgsql/contrib/pgbench/pgbench.c,v 1.62 2007/03/13 09:06:35 mha Exp $
33
*
44
* pgbench: a simple benchmark program for PostgreSQL
55
* written by Tatsuo Ishii
@@ -1184,6 +1184,11 @@ main(int argc, char **argv)
11841184

11851185
char val[64];
11861186

1187+
#ifdef WIN32
1188+
/* stderr is buffered on Win32. */
1189+
setvbuf(stderr, NULL, _IONBF, 0);
1190+
#endif
1191+
11871192
if ((env = getenv("PGHOST")) != NULL && *env != '\0')
11881193
pghost = env;
11891194
if ((env = getenv("PGPORT")) != NULL && *env != '\0')

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