diff options
author | Bruce Momjian <bruce@momjian.us> | 2004-06-10 17:26:14 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2004-06-10 17:26:14 +0000 |
commit | 3a854af43318e586b6ba47dfd24edd8bf3c73b7c (patch) | |
tree | f37955d648b68ea186907b57748f78ab95d9e14f | |
parent | 6de9abc3595142c0882042ddbad6702c5675efad (diff) | |
download | postgresql-3a854af43318e586b6ba47dfd24edd8bf3c73b7c.tar.gz postgresql-3a854af43318e586b6ba47dfd24edd8bf3c73b7c.zip |
Use START for pg_ctl background runs on Win32, from Magnus.
-rw-r--r-- | src/bin/pg_ctl/pg_ctl.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c index 49fd26803c4..e0962dfb8be 100644 --- a/src/bin/pg_ctl/pg_ctl.c +++ b/src/bin/pg_ctl/pg_ctl.c @@ -4,7 +4,7 @@ * * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.9 2004/06/10 16:35:17 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.10 2004/06/10 17:26:14 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -222,9 +222,13 @@ start_postmaster(void) */ char cmd[MAXPGPATH]; - /* Does '&' work on Win32? */ if (log_file != NULL) + /* Win32 needs START rather than "&" */ +#ifndef WIN32 snprintf(cmd, MAXPGPATH, "%s\"%s\" %s < %s >> \"%s\" 2>&1 &%s", +#else + snprintf(cmd, MAXPGPATH, "START %s\"%s\" %s < %s >> \"%s\" 2>&1%s", +#endif SYSTEMQUOTE, postgres_path, post_opts, DEVNULL, log_file, SYSTEMQUOTE); else |