postgresql/src/backend/port/win32
Alvaro Herrera a967613911 Windows: Make pg_ctl reliably detect service status
pg_ctl is using isatty() to verify whether the process is running in a
terminal, and if not it sends its output to Windows' Event Log ... which
does the wrong thing when the output has been redirected to a pipe, as
reported in bug #13592.

To fix, make pg_ctl use the code we already have to detect service-ness:
in the master branch, move src/backend/port/win32/security.c to src/port
(with suitable tweaks so that it runs properly in backend and frontend
environments); pg_ctl already has access to pgport so it Just Works.  In
older branches, that's likely to cause trouble, so instead duplicate the
required code in pg_ctl.c.

Author: Michael Paquier
Bug report and diagnosis: Egon Kocjan
Backpatch: all supported branches
2016-01-07 11:59:08 -03:00
..
Makefile Windows: Make pg_ctl reliably detect service status 2016-01-07 11:59:08 -03:00
crashdump.c Update copyright for 2016 2016-01-02 13:33:40 -05:00
mingwcompat.c Update copyright for 2016 2016-01-02 13:33:40 -05:00
signal.c Update copyright for 2016 2016-01-02 13:33:40 -05:00
socket.c Fix treatment of *lpNumberOfBytesRecvd == 0: that's a completion condition. 2016-01-03 13:56:29 -05:00
timer.c Update copyright for 2016 2016-01-02 13:33:40 -05:00