Commit 0139dea8 authored by Andres Freund's avatar Andres Freund

Remove some dead IsUnderPostmaster code from bootstrap.c.

Since commit 626eb021 has introduced the auxiliary process
infrastructure, bootstrap_signals() was never used when forked from
postmaster.

Remove the IsUnderPostmaster specific code, and add a appropriate
assertion.
parent 31c45316
...@@ -504,42 +504,13 @@ BootstrapModeMain(void) ...@@ -504,42 +504,13 @@ BootstrapModeMain(void)
static void static void
bootstrap_signals(void) bootstrap_signals(void)
{ {
if (IsUnderPostmaster) Assert(!IsUnderPostmaster);
{
/*
* Properly accept or ignore signals the postmaster might send us
*/
pqsignal(SIGHUP, SIG_IGN);
pqsignal(SIGINT, SIG_IGN); /* ignore query-cancel */
pqsignal(SIGTERM, die);
pqsignal(SIGQUIT, quickdie);
pqsignal(SIGALRM, SIG_IGN);
pqsignal(SIGPIPE, SIG_IGN);
pqsignal(SIGUSR1, SIG_IGN);
pqsignal(SIGUSR2, SIG_IGN);
/*
* Reset some signals that are accepted by postmaster but not here
*/
pqsignal(SIGCHLD, SIG_DFL);
pqsignal(SIGTTIN, SIG_DFL);
pqsignal(SIGTTOU, SIG_DFL);
pqsignal(SIGCONT, SIG_DFL);
pqsignal(SIGWINCH, SIG_DFL);
/* /* Set up appropriately for interactive use */
* Unblock signals (they were blocked when the postmaster forked us) pqsignal(SIGHUP, die);
*/ pqsignal(SIGINT, die);
PG_SETMASK(&UnBlockSig); pqsignal(SIGTERM, die);
} pqsignal(SIGQUIT, die);
else
{
/* Set up appropriately for interactive use */
pqsignal(SIGHUP, die);
pqsignal(SIGINT, die);
pqsignal(SIGTERM, die);
pqsignal(SIGQUIT, die);
}
} }
/* /*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment