mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
Replace direct fprintf(stderr) calls by write_stderr(), and cause this
routine to do something appropriate on Win32. Also, add a security check on Win32 that parallels the can't-run-as-root check on Unix. Magnus Hagander
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.420 2004/06/11 01:09:00 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.421 2004/06/24 21:03:08 tgl Exp $
|
||||
*
|
||||
* NOTES
|
||||
* this is the "main" module of the postgres backend and
|
||||
@ -2578,12 +2578,11 @@ PostgresMain(int argc, char *argv[], const char *username)
|
||||
{
|
||||
if (!potential_DataDir)
|
||||
{
|
||||
fprintf(stderr,
|
||||
gettext("%s does not know where to find the database system data.\n"
|
||||
"You must specify the directory that contains the database system\n"
|
||||
"either by specifying the -D invocation option or by setting the\n"
|
||||
"PGDATA environment variable.\n"),
|
||||
argv[0]);
|
||||
write_stderr("%s does not know where to find the database system data.\n"
|
||||
"You must specify the directory that contains the database system\n"
|
||||
"either by specifying the -D invocation option or by setting the\n"
|
||||
"PGDATA environment variable.\n",
|
||||
argv[0]);
|
||||
proc_exit(1);
|
||||
}
|
||||
SetDataDir(potential_DataDir);
|
||||
|
Reference in New Issue
Block a user