Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Wkz5k-0006Q6-Kd for pgsql-bugs@arkaria.postgresql.org; Thu, 15 May 2014 17:05:12 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Wkz5j-0008Kd-V7 for pgsql-bugs@arkaria.postgresql.org; Thu, 15 May 2014 17:05:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WkxsG-0006fb-E9 for pgsql-bugs@postgresql.org; Thu, 15 May 2014 15:47:12 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Wkxs6-0001Jy-Sh for pgsql-bugs@postgresql.org; Thu, 15 May 2014 15:47:10 +0000 MIME-Version: 1.0 Subject: BUG #10330: pg_ctl does not correctly honor "DETACHED_PROCESS" To: pgsql-bugs@postgresql.org From: erica.stine@mailinator.com Date: Thu, 15 May 2014 15:46:20 +0000 Message-ID: <20140515154620.16846.46201@wrigleys.postgresql.org> X-Pg-Spam-Score: -1.2 (-) Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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