diff options
author | Bruce Momjian | 2007-01-23 03:28:49 +0000 |
---|---|---|
committer | Bruce Momjian | 2007-01-23 03:28:49 +0000 |
commit | 882b9948d706af983e101166ec73bb54a7782957 (patch) | |
tree | b49256f79389a5feeb92e1e316bae9484d808904 /src/port/exec.c | |
parent | 610f60a092ea178b96baebd7d4ee958c8061606e (diff) |
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/port/exec.c')
-rw-r--r-- | src/port/exec.c | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/src/port/exec.c b/src/port/exec.c index 0ed4b59014b..28be9d78786 100644 --- a/src/port/exec.c +++ b/src/port/exec.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/port/exec.c,v 1.46 2007/01/23 01:45:11 momjian Exp $ + * $PostgreSQL: pgsql/src/port/exec.c,v 1.47 2007/01/23 03:28:49 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -586,24 +586,8 @@ pclose_check(FILE *stream) log_error(_("child process was terminated by signal %d"), 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)); - - log_error(_("child process was terminated by the operating system\n%s"), - last_system_error); - } + log_error(_("child process was terminated by exception %X\nSee /include/ntstatus.h for a description\nof the hex value."), + WTERMSIG(exitstatus)); #endif else log_error(_("child process exited with unrecognized status %d"), |