From b15f9b08efb0665f0c145ebf928b7e11c0a602ed Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 24 Jun 2004 21:03:42 +0000 Subject: 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 --- src/backend/tcop/postgres.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/backend/tcop/postgres.c') diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 976b417e096..9b7cfcd6681 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.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); -- cgit v1.2.3