mirror of
https://github.com/postgres/postgres.git
synced 2025-08-25 20:23:07 +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/utils/error/assert.c,v 1.26 2004/04/19 17:42:58 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/error/assert.c,v 1.27 2004/06/24 21:03:13 tgl Exp $
|
||||
*
|
||||
* NOTE
|
||||
* This should eventually work with elog()
|
||||
@@ -31,10 +31,10 @@ ExceptionalCondition(char *conditionName,
|
||||
if (!PointerIsValid(conditionName)
|
||||
|| !PointerIsValid(fileName)
|
||||
|| !PointerIsValid(errorType))
|
||||
fprintf(stderr, "TRAP: ExceptionalCondition: bad arguments\n");
|
||||
write_stderr("TRAP: ExceptionalCondition: bad arguments\n");
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "TRAP: %s(\"%s\", File: \"%s\", Line: %d)\n",
|
||||
write_stderr("TRAP: %s(\"%s\", File: \"%s\", Line: %d)\n",
|
||||
errorType, conditionName,
|
||||
fileName, lineNumber);
|
||||
}
|
||||
|
Reference in New Issue
Block a user