From 62a142036ba59c8167ab4539a414e56ba4c39faa Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Wed, 1 Feb 2006 00:31:59 +0000 Subject: Set progname early in the postmaster/postgres binary, rather than doing it later. This fixes a problem where EXEC_BACKEND didn't have progname set, causing a segfault if log_min_messages was set below debug2 and our own snprintf.c was being used. Also alway strdup() progname. Backpatch to 8.1.X and 8.0.X. --- src/backend/postmaster/postmaster.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/backend/postmaster') diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index 43deb57aa2c..78d0471f85d 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.479 2006/01/06 02:58:25 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.480 2006/02/01 00:31:59 momjian Exp $ * * NOTES * @@ -171,9 +171,6 @@ char *ListenAddresses; */ int ReservedBackends; - -static const char *progname = NULL; - /* The socket(s) we're listening to. */ #define MAXLISTEN 64 static int ListenSocket[MAXLISTEN]; @@ -383,9 +380,6 @@ PostmasterMain(int argc, char *argv[]) char *userDoption = NULL; int i; - /* This will call exit() if strdup() fails. */ - progname = get_progname(argv[0]); - MyProcPid = PostmasterPid = getpid(); IsPostmasterEnvironment = true; -- cgit v1.2.3