pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: erica.stine@mailinator.com
To: pgsql-bugs@postgresql.org
Subject: BUG #10330: pg_ctl does not correctly honor "DETACHED_PROCESS"
Date: Thu, 15 May 2014 15:46:20 +0000
Message-ID: <20140515154620.16846.46201@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

The following bug has been logged on the website:

Bug reference:      10330
Logged by:          Erica Stine
Email address:      erica.stine@mailinator.com
PostgreSQL version: 9.3.4
Operating system:   Windows 7 64-bit Ultimate
Description:        

This executable:

https://github.com/cubiclesoft/createprocess-windows

Allows users to start processes in all sorts of ways that exceed the
limitations of the 'start' command by exposing the full power of the
CreateProcess() API to the command-line.  The Apache web server, for
instance, has the problem of starting a hung command prompt using 'start'. 
However, using the above tool and calling it with /f=DETACHED_PROCESS causes
'httpd.exe' to correctly and silently start in the background.

'pg_ctl.exe', on the other hand, does not honor DETACHED_PROCESS and
proceeds to create a new console window.  There doesn't appear to be an
option to override this undesirable behavior.  Trying to use 'postgres.exe'
directly with DETACTHED_PROCESS (and using the stdin, stdout, stderr
options) results in four brand new console windows.  It looks like each
'postgres.exe' process gets its own console window.

The fix for this is to NOT create a console window if it doesn't exist and
pass DETACHED_PROCESS to new processes so that the OS isn't creating console
windows either based on executable type.  I'm not alone in wanting a
detached startup.  Those of us who want isolated installs want to run
PostgreSQL in a portable apps style format, behind the scenes, without using
the Windows Services host.


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (5+ messages)  latest in thread

Message-ID: <20140515154620.16846.46201@wrigleys.postgresql.org>
Permalink:  ../20140515154620.16846.46201@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/20140515154620.16846.46201@wrigleys.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: erica.stine@mailinator.com
  Subject: Re: BUG #10330: pg_ctl does not correctly honor "DETACHED_PROCESS"
  In-Reply-To: <20140515154620.16846.46201@wrigleys.postgresql.org>
  References: <20140515154620.16846.46201@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox