Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0139dea

Browse files
committed
Remove some dead IsUnderPostmaster code from bootstrap.c.
Since commit626eb02 has introduced the auxiliary processinfrastructure, bootstrap_signals() was never used when forked frompostmaster.Remove the IsUnderPostmaster specific code, and add a appropriateassertion.
1 parent31c4531 commit0139dea

File tree

1 file changed

+6
-35
lines changed

1 file changed

+6
-35
lines changed

‎src/backend/bootstrap/bootstrap.c

Lines changed: 6 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -504,42 +504,13 @@ BootstrapModeMain(void)
504504
staticvoid
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)

[8]ページ先頭

©2009-2025 Movatter.jp