diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2016-01-08 13:18:40 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2016-01-08 13:18:40 -0300 |
commit | 463172116634423f8708ad9d7afb0f759a40cf2c (patch) | |
tree | 3db653d5a8f1885409d02b6f139b7566a70a4969 /src | |
parent | e9282e953205a2f3125fc8d1052bc01cb77cd2a3 (diff) | |
download | postgresql-463172116634423f8708ad9d7afb0f759a40cf2c.tar.gz postgresql-463172116634423f8708ad9d7afb0f759a40cf2c.zip |
Revert "Blind attempt at a Cygwin fix"
This reverts commit e9282e953205a2f3125fc8d1052bc01cb77cd2a3, which blew
up in a pretty spectacular way. Re-introduce the original code while we
search for a real fix.
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/pg_ctl/pg_ctl.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c index 28d3cf2a8f9..919d7645979 100644 --- a/src/bin/pg_ctl/pg_ctl.c +++ b/src/bin/pg_ctl/pg_ctl.c @@ -212,6 +212,15 @@ write_stderr(const char *fmt,...) vfprintf(stderr, fmt, ap); #else +/* + * On Cygwin, we don't yet have a reliable mechanism to detect when + * we're being run as a service, so fall back to the old (and broken) + * stderr test. + */ +#ifdef __CYGWIN__ +#define pgwin32_is_service() (isatty(fileno(stderr))) +#endif + /* * On Win32, we print to stderr if running on a console, or write to * eventlog if running as a service |