After elog(PANIC), exit with abort() not proc_exit(). This allows a
authorTom Lane
Fri, 1 Nov 2002 17:55:23 +0000 (17:55 +0000)
committerTom Lane
Fri, 1 Nov 2002 17:55:23 +0000 (17:55 +0000)
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.

src/backend/utils/error/elog.c

index f730fb9527a918d32f4ee5ac1c25957c782538f8..66c17e2e8cc28cfa2b7638bd6e96de3af926db81 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * 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,...)
         * Serious crash time. Postmaster will observe nonzero process
         * 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...
         */
        ImmediateInterruptOK = false;
        fflush(stdout);
        fflush(stderr);
-       proc_exit(2);
+       abort();
    }
 
    /* We reach here if lev <= WARNING. OK to return to caller. */