1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +03:00

Move find_my_exec() way up into main.c so it is available to the

timezone code and other places.

Remove elog() calls from find_my_exec;  do fprintf(stderr) instead.  We
can then remove the exec.c handling in the makefile because it doesn't
have to be built to suppress elog calls.
This commit is contained in:
Bruce Momjian
2004-05-18 20:18:59 +00:00
parent da401bd314
commit a9fad44372
10 changed files with 92 additions and 116 deletions

View File

@@ -37,7 +37,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.388 2004/05/17 14:35:29 momjian Exp $
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.389 2004/05/18 20:18:57 momjian Exp $
*
* NOTES
*
@@ -295,8 +295,6 @@ __attribute__((format(printf, 1, 2)));
#ifdef EXEC_BACKEND
static char postgres_exec_path[MAXPGPATH];
#ifdef WIN32
pid_t win32_forkexec(const char* path, char *argv[]);
@@ -690,13 +688,6 @@ PostmasterMain(int argc, char *argv[])
(errmsg_internal("-----------------------------------------")));
}
/*
* On some systems our dynloader code needs the executable's pathname.
*/
if (find_my_exec(argv[0], my_exec_path) < 0)
ereport(FATAL,
(errmsg("%s: could not locate my own executable path",
progname)));
if (strlen(pkglib_path) == 0)
get_pkglib_path(my_exec_path, pkglib_path);