summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-03-07 10:40:44 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2016-03-07 10:41:07 -0500
commit15d43196cde78fb46e989bbd6bb8d294fcf2f492 (patch)
tree4c2f516bf087e0cba2c655618f998234edc6b9dc /src
parent8894c9f791c11e37d040634193caf3667f533111 (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.
Diffstat (limited to 'src')
-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 1d155e0fbdd..c5007e9d2e5 100644
--- a/src/bin/pg_ctl/pg_ctl.c
+++ b/src/bin/pg_ctl/pg_ctl.c
@@ -218,7 +218,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? */