summaryrefslogtreecommitdiff
path: root/src/port/exec.c
diff options
context:
space:
mode:
authorBruce Momjian2007-01-22 18:31:51 +0000
committerBruce Momjian2007-01-22 18:31:51 +0000
commit208ae0c290cdc1d74c9286942860f1a64712f95b (patch)
tree155bb4772746adbbaa467a3fea6828d585ad1aa2 /src/port/exec.c
parenteeae929dbebda8e2d41ebb4e6b974cbb21f84dbe (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.c7
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);