* Portions Copyright (c) 1994, Regents of the University of California
* Portions taken from FreeBSD.
*
- * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.29 2004/05/14 17:04:46 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.30 2004/05/17 13:17:29 momjian Exp $
*
*-------------------------------------------------------------------------
*/
/* path to 'initdb' binary directory */
char bindir[MAXPGPATH];
-char backendbin[MAXPGPATH];
+char backend_exec[MAXPGPATH];
static void *xmalloc(size_t size);
static char *xstrdup(const char *s);
"\"%s\" -boot -x0 %s "
"-c shared_buffers=%d -c max_connections=%d template1 "
"<%s >%s 2>&1",
- backendbin, boot_options,
+ backend_exec, boot_options,
conns[i] * 5, conns[i],
DEVNULL, DEVNULL);
status = system(cmd);
"\"%s\" -boot -x0 %s "
"-c shared_buffers=%d -c max_connections=%d template1 "
"<%s >%s 2>&1",
- backendbin, boot_options,
+ backend_exec, boot_options,
bufs[i], n_connections,
DEVNULL, DEVNULL);
status = system(cmd);
snprintf(cmd, sizeof(cmd),
"\"%s\" -boot -x1 %s %s template1",
- backendbin, boot_options, talkargs);
+ backend_exec, boot_options, talkargs);
PG_CMD_OPEN;
snprintf(cmd, sizeof(cmd),
"\"%s\" %s template1 >%s",
- backendbin, backend_options,
+ backend_exec, backend_options,
DEVNULL);
PG_CMD_OPEN;
snprintf(cmd, sizeof(cmd),
"\"%s\" %s template1 >%s",
- backendbin, backend_options,
+ backend_exec, backend_options,
DEVNULL);
PG_CMD_OPEN;
snprintf(cmd, sizeof(cmd),
"\"%s\" %s template1 >%s",
- backendbin, backend_options,
+ backend_exec, backend_options,
DEVNULL);
PG_CMD_OPEN;
snprintf(cmd, sizeof(cmd),
"\"%s\" %s template1 >%s",
- backendbin, backend_options,
+ backend_exec, backend_options,
DEVNULL);
PG_CMD_OPEN;
*/
snprintf(cmd, sizeof(cmd),
"\"%s\" %s -N template1 >%s",
- backendbin, backend_options,
+ backend_exec, backend_options,
DEVNULL);
PG_CMD_OPEN;
snprintf(cmd, sizeof(cmd),
"\"%s\" %s template1 >%s",
- backendbin, backend_options,
+ backend_exec, backend_options,
DEVNULL);
PG_CMD_OPEN;
snprintf(cmd, sizeof(cmd),
"\"%s\" %s template1 >%s",
- backendbin, backend_options,
+ backend_exec, backend_options,
DEVNULL);
PG_CMD_OPEN;
snprintf(cmd, sizeof(cmd),
"\"%s\" %s template1 >%s",
- backendbin, backend_options,
+ backend_exec, backend_options,
DEVNULL);
PG_CMD_OPEN;
*/
snprintf(cmd, sizeof(cmd),
"\"%s\" %s -N template1 >%s",
- backendbin, backend_options,
+ backend_exec, backend_options,
DEVNULL);
PG_CMD_OPEN;
snprintf(cmd, sizeof(cmd),
"\"%s\" %s template1 >%s",
- backendbin, backend_options,
+ backend_exec, backend_options,
DEVNULL);
PG_CMD_OPEN;
snprintf(cmd, sizeof(cmd),
"\"%s\" %s template1 >%s",
- backendbin, backend_options,
+ backend_exec, backend_options,
DEVNULL);
PG_CMD_OPEN;
snprintf(cmd, sizeof(cmd),
"\"%s\" %s template1 >%s",
- backendbin, backend_options,
+ backend_exec, backend_options,
DEVNULL);
PG_CMD_OPEN;
putenv(pgdenv);
if ((ret = find_other_exec(argv[0], "postgres", PG_VERSIONSTR,
- backendbin)) < 0)
+ backend_exec)) < 0)
{
if (ret == -1)
fprintf(stderr,
}
/* store binary directory */
- strcpy(bindir, backendbin);
+ strcpy(bindir, backend_exec);
*last_path_separator(bindir) = '\0';
if ((short_version = get_short_version()) == NULL)