aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/postmaster/pgarch.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/backend/postmaster/pgarch.c b/src/backend/postmaster/pgarch.c
index f84f882c4cb..f3a55acfaab 100644
--- a/src/backend/postmaster/pgarch.c
+++ b/src/backend/postmaster/pgarch.c
@@ -255,8 +255,16 @@ PgArchiverMain(int argc, char *argv[])
static void
pgarch_exit(SIGNAL_ARGS)
{
- /* SIGQUIT means curl up and die ... */
- exit(1);
+ /*
+ * We DO NOT want to run proc_exit() or atexit() callbacks; they wouldn't
+ * be safe to run from a signal handler. Just nail the windows shut and
+ * get out of town.
+ *
+ * For consistency with other postmaster children, we do _exit(2) not
+ * _exit(1). The postmaster currently will treat these exit codes alike,
+ * but it seems better to report that we died in an unexpected way.
+ */
+ _exit(2);
}
/* SIGHUP signal handler for archiver process */