summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2016-03-07 15:40:44 +0000
committerTom Lane2016-03-07 15:41:01 +0000
commitb73e8160516f1cf28522ebe3dc0228aabe7c7dc2 (patch)
tree559c5ed504435c12b35941bca2b5f6a676d36ebb
parenta35f85a524454d0d825b07bf7dc0f8c925233789 (diff)
Fix backwards test for Windows service-ness in pg_ctl.
A thinko in a96761391 caused pg_ctl to get it exactly backwards when deciding whether to report problems to the Windows eventlog or to stderr. Per bug #14001 from Manuel Mathar, who also identified the fix. Like the previous patch, back-patch to all supported branches.
-rw-r--r--src/bin/pg_ctl/pg_ctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c
index 4889e3a1a3f..b4621220b91 100644
--- a/src/bin/pg_ctl/pg_ctl.c
+++ b/src/bin/pg_ctl/pg_ctl.c
@@ -221,7 +221,7 @@ write_stderr(const char *fmt,...)
* On Win32, we print to stderr if running on a console, or write to
* eventlog if running as a service
*/
- if (!pgwin32_is_service()) /* Running as a service */
+ if (pgwin32_is_service()) /* Running as a service */
{
char errbuf[2048]; /* Arbitrary size? */