Skip to content

Commit 72f9013

Browse files
committed
Fix Cygwin using of pg_ctl by not usig START.
Reini Urban
1 parent c7add81 commit 72f9013

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/bin/pg_ctl/pg_ctl.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
66
*
7-
* $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.39 2004/10/16 03:10:14 momjian Exp $
7+
* $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.40 2004/10/16 03:32:08 momjian Exp $
88
*
99
*-------------------------------------------------------------------------
1010
*/
@@ -23,6 +23,8 @@
2323

2424
#if defined(__CYGWIN__)
2525
#include <windows.h>
26+
/* Cygwin defines WIN32 in windows.h, but we don't want it. */
27+
#undef WIN32
2628
#endif
2729

2830
#ifndef HAVE_OPTRESET
@@ -333,15 +335,15 @@ start_postmaster(void)
333335
* http://dev.remotenetworktechnology.com/cmd/cmdfaq.htm
334336
*/
335337
if (log_file != NULL)
336-
#if !defined(WIN32) && !defined(__CYGWIN__)
338+
#if !defined(WIN32) /* Cygwin doesn't have START */
337339
snprintf(cmd, MAXPGPATH, "%s\"%s\" %s%s < \"%s\" >> \"%s\" 2>&1 &%s",
338340
#else
339341
snprintf(cmd, MAXPGPATH, "%sSTART /B \"\" \"%s\" %s%s < \"%s\" >> \"%s\" 2>&1%s",
340342
#endif
341343
SYSTEMQUOTE, postgres_path, pgdata_opt, post_opts,
342344
DEVNULL, log_file, SYSTEMQUOTE);
343345
else
344-
#if !defined(WIN32) && !defined(__CYGWIN__)
346+
#if !defined(WIN32) /* Cygwin doesn't have START */
345347
snprintf(cmd, MAXPGPATH, "%s\"%s\" %s%s < \"%s\" 2>&1 &%s",
346348
#else
347349
snprintf(cmd, MAXPGPATH, "%sSTART /B \"\" \"%s\" %s%s < \"%s\" 2>&1%s",

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