Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 0139dea

Browse files
committed
Remove some dead IsUnderPostmaster code from bootstrap.c.
Since commit 626eb02 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.
1 parent 31c4531 commit 0139dea

File tree

1 file changed

+6
-35
lines changed

1 file changed

+6
-35
lines changed

src/backend/bootstrap/bootstrap.c

+6-35
Original file line numberDiff line numberDiff line change
@@ -504,42 +504,13 @@ BootstrapModeMain(void)
504504
static void
505505
bootstrap_signals(void)
506506
{
507-
if (IsUnderPostmaster)
508-
{
509-
/*
510-
* Properly accept or ignore signals the postmaster might send us
511-
*/
512-
pqsignal(SIGHUP, SIG_IGN);
513-
pqsignal(SIGINT, SIG_IGN); /* ignore query-cancel */
514-
pqsignal(SIGTERM, die);
515-
pqsignal(SIGQUIT, quickdie);
516-
pqsignal(SIGALRM, SIG_IGN);
517-
pqsignal(SIGPIPE, SIG_IGN);
518-
pqsignal(SIGUSR1, SIG_IGN);
519-
pqsignal(SIGUSR2, SIG_IGN);
520-
521-
/*
522-
* Reset some signals that are accepted by postmaster but not here
523-
*/
524-
pqsignal(SIGCHLD, SIG_DFL);
525-
pqsignal(SIGTTIN, SIG_DFL);
526-
pqsignal(SIGTTOU, SIG_DFL);
527-
pqsignal(SIGCONT, SIG_DFL);
528-
pqsignal(SIGWINCH, SIG_DFL);
507+
Assert(!IsUnderPostmaster);
529508

530-
/*
531-
* Unblock signals (they were blocked when the postmaster forked us)
532-
*/
533-
PG_SETMASK(&UnBlockSig);
534-
}
535-
else
536-
{
537-
/* Set up appropriately for interactive use */
538-
pqsignal(SIGHUP, die);
539-
pqsignal(SIGINT, die);
540-
pqsignal(SIGTERM, die);
541-
pqsignal(SIGQUIT, die);
542-
}
509+
/* Set up appropriately for interactive use */
510+
pqsignal(SIGHUP, die);
511+
pqsignal(SIGINT, die);
512+
pqsignal(SIGTERM, die);
513+
pqsignal(SIGQUIT, die);
543514
}
544515

545516
/*

0 commit comments

Comments
 (0)