diff options
author | Bruce Momjian <bruce@momjian.us> | 2007-01-23 03:28:49 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2007-01-23 03:28:49 +0000 |
commit | 882b9948d706af983e101166ec73bb54a7782957 (patch) | |
tree | b49256f79389a5feeb92e1e316bae9484d808904 /src/backend | |
parent | 610f60a092ea178b96baebd7d4ee958c8061606e (diff) | |
download | postgresql-882b9948d706af983e101166ec73bb54a7782957.tar.gz postgresql-882b9948d706af983e101166ec73bb54a7782957.zip |
Back out use of FormatMessage(), does error values, not exception
values. Point to /include/ntstatus.h for an exception list, rather than
a URL.
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/postmaster/postmaster.c | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index 7e18251a583..a321f3d1f37 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -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, |