diff options
author | Bruce Momjian | 2007-01-22 18:31:51 +0000 |
---|---|---|
committer | Bruce Momjian | 2007-01-22 18:31:51 +0000 |
commit | 208ae0c290cdc1d74c9286942860f1a64712f95b (patch) | |
tree | 155bb4772746adbbaa467a3fea6828d585ad1aa2 /src/port/exec.c | |
parent | eeae929dbebda8e2d41ebb4e6b974cbb21f84dbe (diff) |
When system() fails in Win32, report it as an exception, print the
exception value in hex, and give a URL where the value can be looked-up.
Diffstat (limited to 'src/port/exec.c')
-rw-r--r-- | src/port/exec.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/port/exec.c b/src/port/exec.c index a8bd3984607..4d54ed0e589 100644 --- a/src/port/exec.c +++ b/src/port/exec.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/port/exec.c,v 1.44 2007/01/05 22:20:02 momjian Exp $ + * $PostgreSQL: pgsql/src/port/exec.c,v 1.45 2007/01/22 18:31:51 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -582,8 +582,13 @@ pclose_check(FILE *stream) log_error(_("child process exited with exit code %d"), WEXITSTATUS(exitstatus)); else if (WIFSIGNALED(exitstatus)) +#ifndef WIN32 log_error(_("child process was terminated by signal %d"), WTERMSIG(exitstatus)); +#else + log_error(_("child process was terminated by exception %X\nSee http://source.winehq.org/source/include/ntstatus.h for a description\nof the hex value."), + WTERMSIG(exitstatus)); +#endif else log_error(_("child process exited with unrecognized status %d"), exitstatus); |