1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-12 05:01:15 +03:00

Further cleanup of ps_status setup code. On platforms where the

environment strings need to be moved around, do so when called from
initial startup (main.c), not in init_ps_status.  This eliminates the
former risk of invalidating saved environment-string pointers, since
no code has yet had a chance to grab any such pointers when main.c
is running.
This commit is contained in:
Tom Lane
2001-10-22 19:41:38 +00:00
parent a19f2605ed
commit 94daee3cb7
4 changed files with 98 additions and 91 deletions

View File

@@ -37,7 +37,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.250 2001/10/21 03:25:35 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.251 2001/10/22 19:41:38 tgl Exp $
*
* NOTES
*
@@ -2090,12 +2090,7 @@ DoBackend(Port *port)
}
/*
* Set process parameters for ps
*
* WARNING: On some platforms the environment will be moved around to
* make room for the ps display string. So any references to
* optarg or getenv() from above will be invalid after this call.
* Better use strdup or something similar.
* Set process parameters for ps display.
*/
init_ps_display(port->user, port->database, remote_host);
set_ps_display("authentication");
@@ -2443,9 +2438,6 @@ SSDataBase(int xlop)
/*
* Identify myself via ps
*
* WARNING: On some platforms the environment will be moved around to
* make room for the ps display string.
*/
switch (xlop)
{