Skip to content

Commit 9fa1843

Browse files
committed
postgres -boot would print the wrong program name in event of a
failure in SelectConfigFiles(). Cosmetic issue, but ...
1 parent 9d83358 commit 9fa1843

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/backend/bootstrap/bootstrap.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/bootstrap/bootstrap.c,v 1.197 2004/12/31 21:59:34 pgsql Exp $
11+
* $PostgreSQL: pgsql/src/backend/bootstrap/bootstrap.c,v 1.198 2005/01/14 21:08:44 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -206,6 +206,7 @@ static IndexList *ILHead = NULL;
206206
int
207207
BootstrapMain(int argc, char *argv[])
208208
{
209+
char *progname = argv[0];
209210
int i;
210211
char *dbname;
211212
int flag;
@@ -228,9 +229,9 @@ BootstrapMain(int argc, char *argv[])
228229
/* Compute paths, if we didn't inherit them from postmaster */
229230
if (my_exec_path[0] == '\0')
230231
{
231-
if (find_my_exec(argv[0], my_exec_path) < 0)
232+
if (find_my_exec(progname, my_exec_path) < 0)
232233
elog(FATAL, "%s: could not locate my own executable path",
233-
argv[0]);
234+
progname);
234235
}
235236

236237
/*
@@ -351,7 +352,7 @@ BootstrapMain(int argc, char *argv[])
351352
/* Acquire configuration parameters, unless inherited from postmaster */
352353
if (!IsUnderPostmaster)
353354
{
354-
if (!SelectConfigFiles(userDoption, argv[0]))
355+
if (!SelectConfigFiles(userDoption, progname))
355356
proc_exit(1);
356357
}
357358

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