diff options
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/main/main.c | 10 | ||||
-rw-r--r-- | src/backend/postmaster/postmaster.c | 11 | ||||
-rw-r--r-- | src/backend/tcop/postgres.c | 15 |
3 files changed, 14 insertions, 22 deletions
diff --git a/src/backend/main/main.c b/src/backend/main/main.c index b0b394fe8b9..e735f487b87 100644 --- a/src/backend/main/main.c +++ b/src/backend/main/main.c @@ -13,7 +13,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/main/main.c,v 1.77 2004/04/19 17:42:57 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/main/main.c,v 1.78 2004/05/18 20:18:57 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -241,6 +241,14 @@ main(int argc, char *argv[]) #endif /* !WIN32 */ } + if (find_my_exec(argv[0], my_exec_path) < 0) + { + fprintf(stderr, + gettext("%s: could not locate my own executable path"), + argv[0]); + exit(1); + } + /* * Now dispatch to one of PostmasterMain, PostgresMain, GucInfoMain, * SubPostmasterMain, pgstat_main, pgstat_mainChild or BootstrapMain diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index c37cb259df2..c9a0d737c44 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -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); diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index f06340a54e4..77fc42e0a54 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.407 2004/05/17 14:35:31 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.408 2004/05/18 20:18:58 momjian Exp $ * * NOTES * this is the "main" module of the postgres backend and @@ -2549,6 +2549,9 @@ PostgresMain(int argc, char *argv[], const char *username) } Assert(DataDir); + if (strlen(pkglib_path) == 0) + get_pkglib_path(my_exec_path, pkglib_path); + /* Acquire configuration parameters */ if (IsUnderPostmaster) { @@ -2646,16 +2649,6 @@ PostgresMain(int argc, char *argv[], const char *username) } /* - * On some systems our dynloader code needs the executable's pathname. - */ - if (strlen(my_exec_path) == 0 && find_my_exec(argv[0], my_exec_path) < 0) - ereport(FATAL, - (errmsg("%s: could not locate postgres executable", - argv[0]))); - if (strlen(pkglib_path) == 0) - get_pkglib_path(my_exec_path, pkglib_path); - - /* * Validate we have been given a reasonable-looking DataDir (if * under postmaster, assume postmaster did this already). */ |