aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/postmaster/postmaster.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index 1e08a94e227..99f98205dd7 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -592,6 +592,36 @@ PostmasterMain(int argc, char *argv[])
getInstallationPaths(argv[0]);
/*
+ * Set up signal handlers for the postmaster process.
+ *
+ * CAUTION: when changing this list, check for side-effects on the signal
+ * handling setup of child processes. See tcop/postgres.c,
+ * bootstrap/bootstrap.c, postmaster/bgwriter.c, postmaster/walwriter.c,
+ * postmaster/autovacuum.c, postmaster/pgarch.c, postmaster/pgstat.c,
+ * postmaster/syslogger.c, postmaster/bgworker.c and
+ * postmaster/checkpointer.c.
+ */
+ pqinitmask();
+ PG_SETMASK(&BlockSig);
+
+ pqsignal(SIGHUP, SIGHUP_handler); /* reread config file and have
+ * children do same */
+ pqsignal(SIGINT, pmdie); /* send SIGTERM and shut down */
+ pqsignal(SIGQUIT, pmdie); /* send SIGQUIT and die */
+ pqsignal(SIGTERM, pmdie); /* wait for children and shut down */
+ pqsignal(SIGALRM, SIG_IGN); /* ignored */
+ pqsignal(SIGPIPE, SIG_IGN); /* ignored */
+ pqsignal(SIGUSR1, sigusr1_handler); /* message from child process */
+ pqsignal(SIGUSR2, dummy_handler); /* unused, reserve for children */
+ pqsignal(SIGCHLD, reaper); /* handle child termination */
+ pqsignal(SIGTTIN, SIG_IGN); /* ignored */
+ pqsignal(SIGTTOU, SIG_IGN); /* ignored */
+ /* ignore SIGXFSZ, so that ulimit violations work like disk full */
+#ifdef SIGXFSZ
+ pqsignal(SIGXFSZ, SIG_IGN); /* ignored */
+#endif
+
+ /*
* Options setup
*/
InitializeGUCOptions();
@@ -1140,36 +1170,6 @@ PostmasterMain(int argc, char *argv[])
}
/*
- * Set up signal handlers for the postmaster process.
- *
- * CAUTION: when changing this list, check for side-effects on the signal
- * handling setup of child processes. See tcop/postgres.c,
- * bootstrap/bootstrap.c, postmaster/bgwriter.c, postmaster/walwriter.c,
- * postmaster/autovacuum.c, postmaster/pgarch.c, postmaster/pgstat.c,
- * postmaster/syslogger.c, postmaster/bgworker.c and
- * postmaster/checkpointer.c.
- */
- pqinitmask();
- PG_SETMASK(&BlockSig);
-
- pqsignal(SIGHUP, SIGHUP_handler); /* reread config file and have
- * children do same */
- pqsignal(SIGINT, pmdie); /* send SIGTERM and shut down */
- pqsignal(SIGQUIT, pmdie); /* send SIGQUIT and die */
- pqsignal(SIGTERM, pmdie); /* wait for children and shut down */
- pqsignal(SIGALRM, SIG_IGN); /* ignored */
- pqsignal(SIGPIPE, SIG_IGN); /* ignored */
- pqsignal(SIGUSR1, sigusr1_handler); /* message from child process */
- pqsignal(SIGUSR2, dummy_handler); /* unused, reserve for children */
- pqsignal(SIGCHLD, reaper); /* handle child termination */
- pqsignal(SIGTTIN, SIG_IGN); /* ignored */
- pqsignal(SIGTTOU, SIG_IGN); /* ignored */
- /* ignore SIGXFSZ, so that ulimit violations work like disk full */
-#ifdef SIGXFSZ
- pqsignal(SIGXFSZ, SIG_IGN); /* ignored */
-#endif
-
- /*
* If enabled, start up syslogger collection subprocess
*/
SysLoggerPID = SysLogger_Start();