diff options
author | Andres Freund <andres@anarazel.de> | 2015-01-13 16:44:09 +0100 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2015-01-14 00:37:02 +0100 |
commit | 0139dea8f1cea49f13c22a3f645dbdd02b90d25c (patch) | |
tree | 8939a5c52e48164576f9a90c7b2d89cd9984ac38 /src/backend/bootstrap/bootstrap.c | |
parent | 31c453165b5a656044ce1dbce89f5828c1c7e23c (diff) | |
download | postgresql-0139dea8f1cea49f13c22a3f645dbdd02b90d25c.tar.gz postgresql-0139dea8f1cea49f13c22a3f645dbdd02b90d25c.zip |
Remove some dead IsUnderPostmaster code from bootstrap.c.
Since commit 626eb021988a2 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.
Diffstat (limited to 'src/backend/bootstrap/bootstrap.c')
-rw-r--r-- | src/backend/bootstrap/bootstrap.c | 41 |
1 files changed, 6 insertions, 35 deletions
diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c index 57a1c99d61c..0819e804bec 100644 --- a/src/backend/bootstrap/bootstrap.c +++ b/src/backend/bootstrap/bootstrap.c @@ -504,42 +504,13 @@ BootstrapModeMain(void) static void bootstrap_signals(void) { - if (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); + Assert(!IsUnderPostmaster); - /* - * Unblock signals (they were blocked when the postmaster forked us) - */ - PG_SETMASK(&UnBlockSig); - } - else - { - /* Set up appropriately for interactive use */ - pqsignal(SIGHUP, die); - pqsignal(SIGINT, die); - pqsignal(SIGTERM, die); - pqsignal(SIGQUIT, die); - } + /* Set up appropriately for interactive use */ + pqsignal(SIGHUP, die); + pqsignal(SIGINT, die); + pqsignal(SIGTERM, die); + pqsignal(SIGQUIT, die); } /* |