mirror of
https://github.com/postgres/postgres.git
synced 2025-07-14 08:21:07 +03:00
Back out use of FormatMessage(), does error values, not exception
values. Point to /include/ntstatus.h for an exception list, rather than a URL.
This commit is contained in:
@ -37,7 +37,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.511 2007/01/23 01:45:11 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.512 2007/01/23 03:28:49 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
*
|
||||
@ -2430,30 +2430,14 @@ LogChildExit(int lev, const char *procname, int pid, int exitstatus)
|
||||
(errmsg("%s (PID %d) was terminated by signal %d",
|
||||
procname, pid, WTERMSIG(exitstatus))));
|
||||
#else
|
||||
{
|
||||
static char last_system_error[512];
|
||||
|
||||
if (WERRORCODE(exitstatus) == 0 ||
|
||||
FormatMessage(FORMAT_MESSAGE_IGNORE_INSERTS |
|
||||
FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
NULL,
|
||||
WERRORCODE(exitstatus),
|
||||
MAKELANGID(LANG_ENGLISH, SUBLANG_DEFAULT),
|
||||
last_system_error,
|
||||
sizeof(last_system_error) - 1,
|
||||
NULL) == 0)
|
||||
snprintf(last_system_error, sizeof(last_system_error) - 1,
|
||||
"Unknown error %X.", WEXITSTATUS(exitstatus));
|
||||
|
||||
ereport(lev,
|
||||
|
||||
|
||||
/*------
|
||||
translator: %s is a noun phrase describing a child process, such as
|
||||
"server process" */
|
||||
(errmsg("%s (PID %d) was terminated by the operating system",
|
||||
procname, pid),
|
||||
errdetail("%s", last_system_error)));
|
||||
}
|
||||
(errmsg("%s (PID %d) was terminated by exception %X",
|
||||
procname, pid, WTERMSIG(exitstatus)),
|
||||
errhint("See /include/ntstatus.h for a description of the hex value.")));
|
||||
#endif
|
||||
else
|
||||
ereport(lev,
|
||||
|
Reference in New Issue
Block a user