Skip to content

Commit 3a854af

Browse files
committed
Use START for pg_ctl background runs on Win32, from Magnus.
1 parent 6de9abc commit 3a854af

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/bin/pg_ctl/pg_ctl.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
66
*
7-
* $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.9 2004/06/10 16:35:17 momjian Exp $
7+
* $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.10 2004/06/10 17:26:14 momjian Exp $
88
*
99
*-------------------------------------------------------------------------
1010
*/
@@ -222,9 +222,13 @@ start_postmaster(void)
222222
*/
223223
char cmd[MAXPGPATH];
224224

225-
/* Does '&' work on Win32? */
226225
if (log_file != NULL)
226+
/* Win32 needs START rather than "&" */
227+
#ifndef WIN32
227228
snprintf(cmd, MAXPGPATH, "%s\"%s\" %s < %s >> \"%s\" 2>&1 &%s",
229+
#else
230+
snprintf(cmd, MAXPGPATH, "START %s\"%s\" %s < %s >> \"%s\" 2>&1%s",
231+
#endif
228232
SYSTEMQUOTE, postgres_path, post_opts, DEVNULL, log_file,
229233
SYSTEMQUOTE);
230234
else

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy