summaryrefslogtreecommitdiff
path: root/src/backend/postmaster/postmaster.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2007-01-22 18:31:51 +0000
committerBruce Momjian <bruce@momjian.us>2007-01-22 18:31:51 +0000
commit208ae0c290cdc1d74c9286942860f1a64712f95b (patch)
tree155bb4772746adbbaa467a3fea6828d585ad1aa2 /src/backend/postmaster/postmaster.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/backend/postmaster/postmaster.c')
-rw-r--r--src/backend/postmaster/postmaster.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index f4c424c9680..474e0311112 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.508 2007/01/16 13:28:56 alvherre Exp $
+ * $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.509 2007/01/22 18:31:51 momjian Exp $
*
* NOTES
*
@@ -2421,6 +2421,7 @@ LogChildExit(int lev, const char *procname, int pid, int exitstatus)
(errmsg("%s (PID %d) exited with exit code %d",
procname, pid, WEXITSTATUS(exitstatus))));
else if (WIFSIGNALED(exitstatus))
+#ifndef WIN32
ereport(lev,
/*------
@@ -2428,6 +2429,15 @@ LogChildExit(int lev, const char *procname, int pid, int exitstatus)
"server process" */
(errmsg("%s (PID %d) was terminated by signal %d",
procname, pid, WTERMSIG(exitstatus))));
+#else
+ ereport(lev,
+
+ /*------
+ translator: %s is a noun phrase describing a child process, such as
+ "server process" */
+ (errmsg("%s (PID %d) was terminated by exception %X\nSee http://source.winehq.org/source/include/ntstatus.h for a description\nof the hex value.",
+ procname, pid, WTERMSIG(exitstatus))));
+#endif
else
ereport(lev,