Commit 9fa18434 authored by Tom Lane's avatar Tom Lane

postgres -boot would print the wrong program name in event of a

failure in SelectConfigFiles().  Cosmetic issue, but ...
parent 9d833584
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/bootstrap/bootstrap.c,v 1.197 2004/12/31 21:59:34 pgsql Exp $ * $PostgreSQL: pgsql/src/backend/bootstrap/bootstrap.c,v 1.198 2005/01/14 21:08:44 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -206,6 +206,7 @@ static IndexList *ILHead = NULL; ...@@ -206,6 +206,7 @@ static IndexList *ILHead = NULL;
int int
BootstrapMain(int argc, char *argv[]) BootstrapMain(int argc, char *argv[])
{ {
char *progname = argv[0];
int i; int i;
char *dbname; char *dbname;
int flag; int flag;
...@@ -228,9 +229,9 @@ BootstrapMain(int argc, char *argv[]) ...@@ -228,9 +229,9 @@ BootstrapMain(int argc, char *argv[])
/* Compute paths, if we didn't inherit them from postmaster */ /* Compute paths, if we didn't inherit them from postmaster */
if (my_exec_path[0] == '\0') if (my_exec_path[0] == '\0')
{ {
if (find_my_exec(argv[0], my_exec_path) < 0) if (find_my_exec(progname, my_exec_path) < 0)
elog(FATAL, "%s: could not locate my own executable path", elog(FATAL, "%s: could not locate my own executable path",
argv[0]); progname);
} }
/* /*
...@@ -351,7 +352,7 @@ BootstrapMain(int argc, char *argv[]) ...@@ -351,7 +352,7 @@ BootstrapMain(int argc, char *argv[])
/* Acquire configuration parameters, unless inherited from postmaster */ /* Acquire configuration parameters, unless inherited from postmaster */
if (!IsUnderPostmaster) if (!IsUnderPostmaster)
{ {
if (!SelectConfigFiles(userDoption, argv[0])) if (!SelectConfigFiles(userDoption, progname))
proc_exit(1); proc_exit(1);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment