Skip site navigation (1) Skip section navigation (2)

pg_ctl start broken on windows

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: pgsql-hackers-win32 <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: pg_ctl start broken on windows
Date: 2004-06-09 14:45:41
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers-win32
As I feared might happen, the use of a system() call to start the 
postmaster in Windows is broken because of the brain dead way its shell 
handles quotes.  I was able to get around this in initdb by making sure 
that only one thing on the command line was quoted (by putting PGDATA in 
the environment instead of the command line). We can't do that here ;-( 
. Here's what happens:

C:\msys\1.0\local\pgsql>bin\pg_ctl -D data -l logfile start
'C:/msys/1.0/local/pgsql/bin/postmaster.exe"  < nul >>"logfile' is not recognized as an internal or external command, operable program or batch file.

I think we'll have to bite the bullet and replace that system() call 
with a direct call to CreateProcess() with the appropriate parameters. I 
haven't ever done this, so some help from one of the more experienced 
Windows programmers would be appreciated.




pgsql-hackers-win32 by date

Next:From: Greg StarkDate: 2004-06-09 15:39:10
Subject: Re: Tablespaces
Previous:From: Gary DoadesDate: 2004-06-09 07:06:08
Subject: Re: Speed issues

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group