/* Initialize paths to installation files */
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
*/
on_proc_exit(unlink_external_pid_file, 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
-
/*
* If enabled, start up syslogger collection subprocess
*/