Skip to content

Commit 0d97eb6

Browse files
committed
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.
1 parent 8631924 commit 0d97eb6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/backend/utils/error/elog.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.103 2002/09/04 20:31:30 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.104 2002/11/01 17:55:23 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -500,13 +500,13 @@ elog(int lev, const char *fmt,...)
500500
* Serious crash time. Postmaster will observe nonzero process
501501
* exit status and kill the other backends too.
502502
*
503-
* XXX: what if we are *in* the postmaster? proc_exit() won't kill
503+
* XXX: what if we are *in* the postmaster? abort() won't kill
504504
* our children...
505505
*/
506506
ImmediateInterruptOK = false;
507507
fflush(stdout);
508508
fflush(stderr);
509-
proc_exit(2);
509+
abort();
510510
}
511511

512512
/* We reach here if lev <= WARNING. OK to return to caller. */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy