mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-18 18:44:06 +08:00
Use /B to start so a new window isn't created, per Andrew Dunstan.
This commit is contained in:
parent
45616f5bbb
commit
c9d327b866
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.11 2004/06/10 17:45:09 momjian Exp $
|
* $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.12 2004/06/10 18:02:36 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -223,11 +223,11 @@ start_postmaster(void)
|
|||||||
char cmd[MAXPGPATH];
|
char cmd[MAXPGPATH];
|
||||||
|
|
||||||
if (log_file != NULL)
|
if (log_file != NULL)
|
||||||
/* Win32 needs START rather than "&" */
|
/* Win32 needs START /B rather than "&" */
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
snprintf(cmd, MAXPGPATH, "%s\"%s\" %s < %s >> \"%s\" 2>&1 &%s",
|
snprintf(cmd, MAXPGPATH, "%s\"%s\" %s < %s >> \"%s\" 2>&1 &%s",
|
||||||
#else
|
#else
|
||||||
snprintf(cmd, MAXPGPATH, "START %s\"%s\" %s < %s >> \"%s\" 2>&1%s",
|
snprintf(cmd, MAXPGPATH, "START /B %s\"%s\" %s < %s >> \"%s\" 2>&1%s",
|
||||||
#endif
|
#endif
|
||||||
SYSTEMQUOTE, postgres_path, post_opts, DEVNULL, log_file,
|
SYSTEMQUOTE, postgres_path, post_opts, DEVNULL, log_file,
|
||||||
SYSTEMQUOTE);
|
SYSTEMQUOTE);
|
||||||
@ -235,7 +235,7 @@ start_postmaster(void)
|
|||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
snprintf(cmd, MAXPGPATH, "%s\"%s\" %s < \"%s\" 2>&1 &%s",
|
snprintf(cmd, MAXPGPATH, "%s\"%s\" %s < \"%s\" 2>&1 &%s",
|
||||||
#else
|
#else
|
||||||
snprintf(cmd, MAXPGPATH, "START %s\"%s\" %s < \"%s\" 2>&1%s",
|
snprintf(cmd, MAXPGPATH, "START /B %s\"%s\" %s < \"%s\" 2>&1%s",
|
||||||
#endif
|
#endif
|
||||||
SYSTEMQUOTE, postgres_path, post_opts, DEVNULL, SYSTEMQUOTE);
|
SYSTEMQUOTE, postgres_path, post_opts, DEVNULL, SYSTEMQUOTE);
|
||||||
return system(cmd);
|
return system(cmd);
|
||||||
|
Loading…
Reference in New Issue
Block a user