summaryrefslogtreecommitdiff
path: root/src/backend/utils/error/elog.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>1999-04-20 02:19:59 +0000
committerTom Lane <tgl@sss.pgh.pa.us>1999-04-20 02:19:59 +0000
commit09c5e84072326c1774bef933c8712906b0f01f85 (patch)
treeec9425c92fee8d4b87169a80fe4757f2c4a307be /src/backend/utils/error/elog.c
parentd30e2ac306c26271474e1b96c087ff8e6d859ac2 (diff)
Change elog(ERROR) to get back to main loop via a plain sigsetjmp,
instead of doing a kill(self, SIGQUIT) and expecting the signal handler to do it. Also, clean up inconsistent definitions of the sigjmp buffer in the several files that already referenced it.
Diffstat (limited to 'src/backend/utils/error/elog.c')
-rw-r--r--src/backend/utils/error/elog.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c
index 3704f457f82..e1fa74634af 100644
--- a/src/backend/utils/error/elog.c
+++ b/src/backend/utils/error/elog.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.40 1999/04/16 06:38:17 ishii Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.41 1999/04/20 02:19:54 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -32,6 +32,7 @@
#include "miscadmin.h"
#include "libpq/libpq.h"
#include "storage/proc.h"
+#include "tcop/tcopprot.h"
#include "utils/trace.h"
#ifdef USE_SYSLOG
@@ -216,24 +217,12 @@ elog(int lev, const char *fmt,...)
if (lev == ERROR)
{
- extern bool InError;
-
ProcReleaseSpins(NULL); /* get rid of spinlocks we hold */
if (!InError)
{
- if (MyProcPid == 0) {
- kill(getpid(), SIGQUIT);
- } else {
- kill(MyProcPid, SIGQUIT); /* abort to traffic cop */
- }
- pause();
+ /* exit to main loop */
+ siglongjmp(Warn_restart, 1);
}
-
- /*
- * The pause(3) is just to avoid race conditions where the thread
- * of control on an MP system gets past here (i.e., the signal is
- * not received instantaneously).
- */
}
if (lev == FATAL)