Skip to content
Snippets Groups Projects
Select Git revision
  • benchmark-tools
  • postgres-lambda
  • master default
  • REL9_4_25
  • REL9_5_20
  • REL9_6_16
  • REL_10_11
  • REL_11_6
  • REL_12_1
  • REL_12_0
  • REL_12_RC1
  • REL_12_BETA4
  • REL9_4_24
  • REL9_5_19
  • REL9_6_15
  • REL_10_10
  • REL_11_5
  • REL_12_BETA3
  • REL9_4_23
  • REL9_5_18
  • REL9_6_14
  • REL_10_9
  • REL_11_4
23 results

win32security.c

  • Alvaro Herrera's avatar
    a9676139
    Windows: Make pg_ctl reliably detect service status · a9676139
    Alvaro Herrera authored
    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
    a9676139
    History
    Windows: Make pg_ctl reliably detect service status
    Alvaro Herrera authored
    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