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

Re: pg_ctl using START with paths needing quotes

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: pg_ctl using START with paths needing quotes
Date: 2004-06-11 09:03:10
Message-ID: 40C9754E.7010500@dunslane.net (view raw or flat)
Thread:
Lists: pgsql-hackers-win32pgsql-patches
This is a really ugly hack (I take the blame since I gave Bruce the 
idea). There are a few things to note:

. the .bat file should probably be created in the data dir - that's 
about the only place that we should be guaranteed we can write.
. the command should be preceded by '@' to suppress echoing
. the whole command, including redirections should go inside the .bat 
file, so that pg_ctl just issues 'start /b foo.bat'

There are still things to clean up in pg_ctl, e.g. its handling of 
relative paths to the data dir.

cheers

andrew



Bruce Momjian wrote:

>This applied patch changes the way pg_ctl starts on Win32.
>
>Using START, it is not possible to quote the executable name, who's
>directory might have spaces:
>
>	START /B /program files/x.exe
>
>The fix is to create a temporary batch file in C:\ containing:
>
>	/program files/x.exe
>
>and run START with the batch name:
>
>	START /B C:\PG_CTL_323223.BAT
>
>then unlink the batch file.
>
>  
>

In response to

Responses

pgsql-patches by date

Next:From: Andreas PflugDate: 2004-06-11 09:35:39
Subject: Re: Compiling libpq with VisualC
Previous:From: Bruce MomjianDate: 2004-06-11 03:56:35
Subject: Re: CR fix for create_help.pl

pgsql-hackers-win32 by date

Next:From: Andreas PflugDate: 2004-06-11 09:35:39
Subject: Re: Compiling libpq with VisualC
Previous:From: Bruce MomjianDate: 2004-06-11 03:54:22
Subject: Re: [HACKERS] select like...not using index

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