Commit 0d97eb6a authored by Tom Lane's avatar Tom Lane

After elog(PANIC), exit with abort() not proc_exit(). This allows a

core file to be produced for debugging, and avoids trying to run the
normal proc-exit cleanup hooks, which are likely to cause additional
problems if the system is hosed.
parent 8631924e
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.103 2002/09/04 20:31:30 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.104 2002/11/01 17:55:23 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -500,13 +500,13 @@ elog(int lev, const char *fmt,...) ...@@ -500,13 +500,13 @@ elog(int lev, const char *fmt,...)
* Serious crash time. Postmaster will observe nonzero process * Serious crash time. Postmaster will observe nonzero process
* exit status and kill the other backends too. * exit status and kill the other backends too.
* *
* XXX: what if we are *in* the postmaster? proc_exit() won't kill * XXX: what if we are *in* the postmaster? abort() won't kill
* our children... * our children...
*/ */
ImmediateInterruptOK = false; ImmediateInterruptOK = false;
fflush(stdout); fflush(stdout);
fflush(stderr); fflush(stderr);
proc_exit(2); abort();
} }
/* We reach here if lev <= WARNING. OK to return to caller. */ /* We reach here if lev <= WARNING. OK to return to caller. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment